76 references to SocketException
Aspire.Cli.Tests (8)
Backchannel\AuxiliaryBackchannelMonitorTests.cs (1)
464
ConnectAsyncCallback = _ => ValueTask.FromException<Socket>(new
SocketException
((int)SocketError.ConnectionRefused))
Commands\RunCommandTests.cs (1)
2415
new
SocketException
((int)SocketError.ConnectionRefused)));
Commands\TelemetryFollowTests.cs (1)
34
? new IOException("Connection reset.", new
SocketException
((int)SocketError.ConnectionReset))
DotNet\DotNetCliRunnerTests.cs (3)
1550
ConnectAsyncCallback = (_, _) => throw new
SocketException
((int)SocketError.ConnectionRefused)
1590
ConnectAsyncCallback = (_, _) => throw new
SocketException
((int)SocketError.ConnectionRefused)
1632
ConnectAsyncCallback = (_, _) => throw new
SocketException
((int)SocketError.ConnectionRefused)
Projects\GuestAppHostProjectTests.cs (2)
1996
ConnectAsyncCallback = (_, _) => throw new
SocketException
((int)SocketError.ConnectionRefused)
2024
ConnectAsyncCallback = (_, _) => throw new
SocketException
((int)SocketError.ConnectionRefused)
Aspire.Hosting.Native.Core.Tests (1)
NativeSocketIsolationTests.cs (1)
219
throw new
SocketException
((int)SocketError.ConnectionReset);
Aspire.Hosting.Tests (2)
Utils\SocketExceptionHelpersTests.cs (2)
21
var exception = new IOException("Transport failure.", new
SocketException
((int)socketError));
29
var socketException = new
SocketException
((int)SocketError.ConnectionReset);
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
486
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new
SocketException
((int)_asyncWriteEventArgs.SocketError));
725
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new
SocketException
((int)_asyncReadEventArgs.SocketError));
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\SocketAwaitableEventArgs.cs (1)
61
return new
SocketException
((int)e);
Microsoft.Extensions.Diagnostics.ExceptionSummarization.Tests (3)
ExceptionSummarizerTests.cs (1)
185
var exception = new Exception("test", new
SocketException
((int)SocketError.TimedOut));
HttpExceptionSummaryProviderTests.cs (2)
94
Exception exception = new
SocketException
((int)socketError);
105
Exception exception = new
SocketException
(errorCode);
System.Net.NameResolution (3)
System\Net\Dns.cs (2)
487
exception = new
SocketException
((int)SocketError.HostNotFound);
998
new
SocketException
((int)error) { HResult = nativeError };
System\Net\DnsSocket.cs (1)
114
throw new
SocketException
((int)SocketError.TimedOut);
System.Net.Ping (1)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
29
throw new
SocketException
((int)SocketError.AddressFamilyNotSupported);
System.Net.Primitives (1)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
29
throw new
SocketException
((int)SocketError.AddressFamilyNotSupported);
System.Net.Quic (6)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
29
throw new
SocketException
((int)SocketError.AddressFamilyNotSupported);
System\Net\Quic\Internal\ThrowHelper.cs (4)
83
if (status == QUIC_STATUS_INVALID_ADDRESS) return new
SocketException
((int)SocketError.AddressNotAvailable);
84
if (status == QUIC_STATUS_ADDRESS_IN_USE) return new
SocketException
((int)SocketError.AddressAlreadyInUse);
85
if (status == QUIC_STATUS_UNREACHABLE) return new
SocketException
((int)SocketError.HostUnreachable);
86
if (status == QUIC_STATUS_ADDRESS_NOT_AVAILABLE) return new
SocketException
((int)SocketError.AddressFamilyNotSupported);
System\Net\Quic\QuicConnection.cs (1)
401
throw new
SocketException
((int)SocketError.HostNotFound);
System.Net.Security (8)
System\Net\Security\TlsSession.cs (8)
2135
throw new
SocketException
((int)drainErr);
2170
throw new
SocketException
((int)sendErr);
2199
throw new
SocketException
((int)recvErr);
2296
throw new
SocketException
((int)recvErr);
2330
throw new
SocketException
((int)drainErr);
2373
throw new
SocketException
((int)sendErr);
2420
throw new
SocketException
((int)leftoverErr);
2447
throw new
SocketException
((int)sendErr);
System.Net.Sockets (38)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
29
throw new
SocketException
((int)SocketError.AddressFamilyNotSupported);
System\Net\Sockets\Socket.cs (19)
92
throw new
SocketException
((int)errorCode);
1141
throw new
SocketException
((int)errorCode);
1170
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1192
throw new
SocketException
((int)errorCode);
1218
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1245
throw new
SocketException
((int)errorCode);
1263
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1544
throw new
SocketException
((int)errorCode);
1567
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1590
throw new
SocketException
((int)errorCode);
1608
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1635
throw new
SocketException
((int)errorCode);
1665
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new
SocketException
((int)errorCode));
1849
socketException = new
SocketException
((int)errorCode);
1973
socketException = new
SocketException
((int)errorCode);
2049
SocketException socketException = new
SocketException
((int)errorCode);
2433
throw new
SocketException
((int)errorCode);
3938
var socketException = new
SocketException
((int)error);
4064
throw new
SocketException
((int)SocketError.IsConnected);
System\Net\Sockets\Socket.Tasks.cs (3)
162
throw new
SocketException
((int)SocketError.IsConnected);
903
Exception e = ExceptionDispatchInfo.SetCurrentStackTrace(new
SocketException
((int)error));
1370
Exception e = new
SocketException
((int)error);
System\Net\Sockets\Socket.Unix.cs (4)
73
throw new
SocketException
((int)SocketError.NotSocket);
81
throw new
SocketException
((int)SocketError.NotSocket);
127
throw new
SocketException
((int)errorCode);
192
throw new
SocketException
((int)SocketError.InvalidArgument);
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
594
throw new
SocketException
((int)SocketPal.GetSocketErrorForErrorCode(Interop.Sys.GetLastError()));
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
839
caughtException = new
SocketException
((int)lastError);
844
caughtException = new
SocketException
((int)SocketError.OperationAborted);
System\Net\Sockets\SocketPal.Unix.cs (4)
2157
throw new
SocketException
((int)error);
2168
throw new
SocketException
((int)error);
2214
throw new
SocketException
((int)GetSocketErrorForErrorCode(err));
2228
throw new
SocketException
((int)errorCode);
System\Net\Sockets\UDPClient.cs (4)
432
throw new
SocketException
((int)SocketError.OperationNotSupported);
452
throw new
SocketException
((int)SocketError.OperationNotSupported);
520
throw new
SocketException
((int)SocketError.OperationNotSupported);
800
throw new
SocketException
((int)SocketError.NotConnected);
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
103
return new
SocketException
((int)e);
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
103
return new
SocketException
((int)e);