90 references to SocketErrorCode
aspire (1)
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
355
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.ConnectionRefused)
Aspire.Dashboard.Tests (1)
Integration\ServerRetryHelper.cs (1)
171
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.AddressAlreadyInUse)
Aspire.Hosting (1)
Backchannel\AuxiliaryBackchannelService.cs (1)
177
catch (IOException ex) when (ex.InnerException is SocketException {
SocketErrorCode
: SocketError.ConnectionReset })
dotnet-svcutil-lib (24)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (24)
208
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.ERROR_INVALID_HANDLE)
219
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAECONNABORTED &&
226
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAENETRESET ||
227
(int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAECONNABORTED ||
228
(int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAECONNRESET)
240
else if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAETIMEDOUT)
249
return new CommunicationObjectAbortedException(string.Format(SRServiceModel.TcpTransferError, (int)socketException.
SocketErrorCode
, socketException.Message), originalException);
253
CommunicationException communicationException = new CommunicationException(string.Format(SRServiceModel.TcpTransferError, (int)socketException.
SocketErrorCode
, socketException.Message), originalException);
437
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.ERROR_INVALID_HANDLE)
442
if ((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)
452
return new EndpointNotFoundException(string.Format(SRServiceModel.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
456
return new EndpointNotFoundException(string.Format(SRServiceModel.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message, timeSpent), innerException);
459
else if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAENOBUFS)
463
else 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)
473
return new CommunicationException(string.Format(SRServiceModel.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
477
return new CommunicationException(string.Format(SRServiceModel.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message, timeSpent), innerException);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
134
catch (SocketException e) when (e.
SocketErrorCode
== SocketError.AddressAlreadyInUse)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
HttpExceptionSummaryProvider.cs (1)
106
if (_socketErrorMap.TryGetValue(ex.
SocketErrorCode
, out var index))
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
TcpEndpointProbesServiceTests.cs (1)
109
if (e.
SocketErrorCode
== SocketError.ConnectionRefused)
Microsoft.TestPlatform.CommunicationUtilities (2)
SocketCommunicationManager.cs (1)
376
&& socketException.
SocketErrorCode
== SocketError.TimedOut)
TcpClientExtensions.cs (1)
73
&& socketException.
SocketErrorCode
== SocketError.TimedOut)
System.IO.Pipes (2)
System\IO\Pipes\NamedPipeClientStream.Unix.cs (1)
51
switch (e.
SocketErrorCode
)
System\IO\Pipes\PipeStream.Unix.cs (1)
334
if (e.
SocketErrorCode
== SocketError.Shutdown) // EPIPE
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
157
socketException.
SocketErrorCode
is SocketError.HostNotFound or SocketError.TryAgain)
System.Net.NameResolution (4)
System\Net\Dns.cs (3)
561
catch (SocketException ex) when (addressFamily == AddressFamily.InterNetworkV6 && ex.
SocketErrorCode
== SocketError.HostNotFound)
858
catch (SocketException ex) when (family == AddressFamily.InterNetworkV6 && ex.
SocketErrorCode
== SocketError.HostNotFound)
871
catch (SocketException ex) when (family == AddressFamily.InterNetworkV6 && ex.
SocketErrorCode
== SocketError.HostNotFound)
System\Net\NameResolutionTelemetry.cs (1)
145
internal static string GetErrorType(Exception exception) => (exception as SocketException)?.
SocketErrorCode
switch
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
208
catch (SocketException se) when (se.
SocketErrorCode
== SocketError.OperationAborted)
System.Net.Ping (6)
System\Net\NetworkInformation\Ping.RawSocket.cs (6)
281
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.TimedOut)
284
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.MessageSize)
288
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.HostUnreachable)
366
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.TimedOut)
369
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.MessageSize)
376
catch (SocketException ex) when (ex.
SocketErrorCode
== SocketError.HostUnreachable)
System.Net.Requests (3)
System\Net\FtpWebRequest.cs (2)
918
sEx.
SocketErrorCode
== SocketError.TimedOut)
937
if (se.
SocketErrorCode
== SocketError.HostNotFound)
System\Net\WebException.cs (1)
113
switch (socketException.
SocketErrorCode
)
System.Net.Sockets (8)
System\Net\Sockets\Socket.cs (4)
1844
if (socketException.
SocketErrorCode
!= SocketError.MessageSize)
1968
if (socketException.
SocketErrorCode
!= SocketError.MessageSize)
3935
UpdateStatusAfterSocketError(socketException.
SocketErrorCode
, disconnectOnFailure);
4083
SocketException se => se.
SocketErrorCode
,
System\Net\Sockets\Socket.Unix.cs (1)
284
catch (TargetInvocationException ex) when (ex.InnerException is SocketException se && se.
SocketErrorCode
== SocketError.OperationNotSupported)
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
454
_socketError = socketException.
SocketErrorCode
;
879
(caughtException is SocketException se && se.
SocketErrorCode
== SocketError.OperationAborted))
System\Net\Sockets\SocketPal.Unix.cs (1)
2146
exc is SocketException se ? se.
SocketErrorCode
:
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
125
SocketError socketErrorCode = innerSocketException.
SocketErrorCode
;
System.ServiceModel.NetTcp (16)
System\ServiceModel\Channels\SocketConnection.cs (16)
827
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.ERROR_INVALID_HANDLE)
832
if ((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)
842
return new EndpointNotFoundException(SR.Format(SR.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
846
return new EndpointNotFoundException(SR.Format(SR.TcpConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message, timeSpent), innerException);
849
else if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAENOBUFS)
853
else 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)
863
return new CommunicationException(SR.Format(SR.TcpConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
867
return 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)
792
if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.ERROR_INVALID_HANDLE)
797
if ((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)
807
return new EndpointNotFoundException(SR.Format(SR.UDSConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
811
return new EndpointNotFoundException(SR.Format(SR.UDSConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message, timeSpent), innerException);
814
else if ((int)socketException.
SocketErrorCode
== UnsafeNativeMethods.WSAENOBUFS)
818
else 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)
828
return new CommunicationException(SR.Format(SR.UDSConnectError, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message), innerException);
832
return new CommunicationException(SR.Format(SR.UDSConnectErrorWithTimeSpan, remoteUri.AbsoluteUri, (int)socketException.
SocketErrorCode
, socketException.Message, timeSpent), innerException);