101 references to SocketErrorCode
aspire (1)
Aspire.Dashboard.Tests (1)
ClientSample (6)
dotnet-svcutil-lib (24)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (24)
208if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_INVALID_HANDLE)
219if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNABORTED &&
226if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETRESET ||
227(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNABORTED ||
228(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNRESET)
240else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAETIMEDOUT)
249return new CommunicationObjectAbortedException(string.Format(SRServiceModel.TcpTransferError, (int)socketException.SocketErrorCode, socketException.Message), originalException);
253CommunicationException communicationException = new CommunicationException(string.Format(SRServiceModel.TcpTransferError, (int)socketException.SocketErrorCode, socketException.Message), originalException);
437if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_INVALID_HANDLE)
442if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEADDRNOTAVAIL ||
443(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNREFUSED ||
444(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETDOWN ||
445(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETUNREACH ||
446(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTDOWN ||
447(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTUNREACH ||
448(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAETIMEDOUT)
452return new EndpointNotFoundException(string.Format(SRServiceModel.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
456return new EndpointNotFoundException(string.Format(SRServiceModel.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);
459else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENOBUFS)
463else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NOT_ENOUGH_MEMORY ||
464(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NO_SYSTEM_RESOURCES ||
465(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_OUTOFMEMORY)
473return new CommunicationException(string.Format(SRServiceModel.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
477return new CommunicationException(string.Format(SRServiceModel.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);
HttpStress (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (6)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Sockets.BindTests (2)
Sockets.FunctionalTests (2)
System.IO.Pipes (2)
System.Net.Http (1)
System.Net.NameResolution (1)
System.Net.NetworkInformation (1)
System.Net.Ping (6)
System.Net.Requests (3)
System.Net.Sockets (8)
System.ServiceModel.Http (1)
System.ServiceModel.NetTcp (16)
System\ServiceModel\Channels\SocketConnection.cs (16)
827if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_INVALID_HANDLE)
832if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEADDRNOTAVAIL ||
833(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNREFUSED ||
834(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETDOWN ||
835(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETUNREACH ||
836(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTDOWN ||
837(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTUNREACH ||
838(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAETIMEDOUT)
842return new EndpointNotFoundException(SR.Format(SR.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
846return new EndpointNotFoundException(SR.Format(SR.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);
849else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENOBUFS)
853else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NOT_ENOUGH_MEMORY ||
854(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NO_SYSTEM_RESOURCES ||
855(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_OUTOFMEMORY)
863return new CommunicationException(SR.Format(SR.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
867return new CommunicationException(SR.Format(SR.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);
System.ServiceModel.UnixDomainSocket (16)
System\ServiceModel\Channels\SocketConnection.cs (16)
792if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_INVALID_HANDLE)
797if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEADDRNOTAVAIL ||
798(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAECONNREFUSED ||
799(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETDOWN ||
800(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENETUNREACH ||
801(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTDOWN ||
802(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAEHOSTUNREACH ||
803(int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAETIMEDOUT)
807return new EndpointNotFoundException(SR.Format(SR.UDSConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
811return new EndpointNotFoundException(SR.Format(SR.UDSConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);
814else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.WSAENOBUFS)
818else if ((int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NOT_ENOUGH_MEMORY ||
819(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_NO_SYSTEM_RESOURCES ||
820(int)socketException.SocketErrorCode == UnsafeNativeMethods.ERROR_OUTOFMEMORY)
828return new CommunicationException(SR.Format(SR.UDSConnectError, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message), innerException);
832return new CommunicationException(SR.Format(SR.UDSConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.SocketErrorCode, socketException.Message, timeSpent), innerException);