179 references to SR
System.Net.Sockets (179)
System\Net\Sockets\NetworkStream.cs (33)
55
throw new IOException(
SR
.net_sockets_blocking);
59
throw new IOException(
SR
.net_notconnected);
63
throw new IOException(
SR
.net_notstream);
136
throw new ArgumentOutOfRangeException(nameof(value),
SR
.net_io_timeout_use_gt_zero);
163
throw new ArgumentOutOfRangeException(nameof(value),
SR
.net_io_timeout_use_gt_zero);
188
throw new NotSupportedException(
SR
.net_noseek);
197
throw new NotSupportedException(
SR
.net_noseek);
202
throw new NotSupportedException(
SR
.net_noseek);
210
throw new NotSupportedException(
SR
.net_noseek);
235
throw new InvalidOperationException(
SR
.net_writeonlystream);
244
throw WrapException(
SR
.net_io_readfailure, exception);
261
if (!CanRead) throw new InvalidOperationException(
SR
.net_writeonlystream);
269
throw WrapException(
SR
.net_io_readfailure, exception);
305
throw new InvalidOperationException(
SR
.net_readonlystream);
316
throw WrapException(
SR
.net_io_writefailure, exception);
334
if (!CanWrite) throw new InvalidOperationException(
SR
.net_readonlystream);
342
throw WrapException(
SR
.net_io_writefailure, exception);
441
throw new InvalidOperationException(
SR
.net_writeonlystream);
456
throw WrapException(
SR
.net_io_readfailure, exception);
481
throw WrapException(
SR
.net_io_readfailure, exception);
507
throw new InvalidOperationException(
SR
.net_readonlystream);
523
throw WrapException(
SR
.net_io_writefailure, exception);
544
throw WrapException(
SR
.net_io_writefailure, exception);
569
throw new InvalidOperationException(
SR
.net_writeonlystream);
582
throw WrapException(
SR
.net_io_readfailure, exception);
592
throw new InvalidOperationException(
SR
.net_writeonlystream);
605
throw WrapException(
SR
.net_io_readfailure, exception);
630
throw new InvalidOperationException(
SR
.net_readonlystream);
642
throw WrapException(
SR
.net_io_writefailure, exception);
652
throw new InvalidOperationException(
SR
.net_readonlystream);
664
throw WrapException(
SR
.net_io_writefailure, exception);
681
throw new NotSupportedException(
SR
.net_noseek);
721
return new IOException(
SR
.Format(resourceFormatString, innerException.Message), innerException);
System\Net\Sockets\SendPacketsElement.cs (1)
54
throw new ArgumentException(
SR
.net_sockets_sendpackelement_FileStreamMustBeAsync, nameof(fileStream));
System\Net\Sockets\Socket.cs (85)
243
throw new ArgumentException(
SR
.Arg_InvalidHandle, nameof(handle));
506
throw new InvalidOperationException(
SR
.net_sockets_mustnotbebound);
625
throw new NotSupportedException(
SR
.net_invalidversion);
646
throw new NotSupportedException(
SR
.net_invalidversion);
663
throw new NotSupportedException(
SR
.net_invalidversion);
677
throw new NotSupportedException(
SR
.net_invalidversion);
700
throw new NotSupportedException(
SR
.net_invalidversion);
718
throw new NotSupportedException(
SR
.net_invalidversion);
762
throw new NotSupportedException(
SR
.net_invalidversion);
839
throw new InvalidOperationException(
SR
.net_sockets_disconnectedConnect);
844
throw new InvalidOperationException(
SR
.net_sockets_mustnotlisten);
860
throw new NotSupportedException(
SR
.net_invalidversion);
892
throw new NotSupportedException(
SR
.net_invalidversion);
912
throw new NotSupportedException(
SR
.net_invalidversion);
939
throw new ArgumentException(
SR
.net_sockets_invalid_ipaddress_length, nameof(addresses));
947
throw new NotSupportedException(
SR
.net_invalidversion);
977
throw new ArgumentException(
SR
.net_invalidAddressList, nameof(addresses));
1035
throw new InvalidOperationException(
SR
.net_sockets_mustbind);
1040
throw new InvalidOperationException(
SR
.net_sockets_mustlisten);
1045
throw new InvalidOperationException(
SR
.net_sockets_disconnectedAccept);
1146
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1330
throw new NotSupportedException(
SR
.net_notconnected);
1633
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1751
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP));
1755
throw new InvalidOperationException(
SR
.net_sockets_mustbind);
2022
throw new ArgumentOutOfRangeException(nameof(receivedAddress),
SR
.net_sockets_address_small);
2123
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue));
2127
throw new ArgumentException(
SR
.Format(
SR
.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue));
2136
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue));
2146
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue));
2152
throw new ArgumentException(
SR
.net_sockets_invalid_optionValue_all, nameof(optionValue));
2309
throw new ArgumentException(
SR
.net_sockets_invalid_optionValue_all, nameof(level));
2322
throw new NotSupportedException(
SR
.net_invalidversion);
2396
throw new ArgumentNullException(null,
SR
.net_sockets_empty_select);
2401
throw new ArgumentOutOfRangeException(nameof(checkRead),
SR
.Format(
SR
.net_sockets_toolarge_select, nameof(checkRead), MaxSelect.ToString()));
2405
throw new ArgumentOutOfRangeException(nameof(checkWrite),
SR
.Format(
SR
.net_sockets_toolarge_select, nameof(checkWrite), MaxSelect.ToString()));
2409
throw new ArgumentOutOfRangeException(nameof(checkError),
SR
.Format(
SR
.net_sockets_toolarge_select, nameof(checkError), MaxSelect.ToString()));
2562
throw new NotSupportedException(
SR
.net_notconnected);
2691
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2731
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2840
throw new ArgumentException(
SR
.net_multibuffernotsupported, nameof(e));
2844
throw new InvalidOperationException(
SR
.net_sockets_mustbind);
2848
throw new InvalidOperationException(
SR
.net_sockets_mustlisten);
2892
throw new ArgumentException(
SR
.net_multibuffernotsupported, "BufferList");
2897
throw new InvalidOperationException(
SR
.net_sockets_mustnotlisten);
2914
throw new NotSupportedException(
SR
.net_invalidversion);
2934
throw new NotSupportedException(
SR
.net_invalidversion);
2990
throw new ArgumentException(
SR
.net_multibuffernotsupported, nameof(e));
2994
throw new ArgumentException(
SR
.Format(
SR
.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3098
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e));
3103
throw new ArgumentException(
SR
.Format(
SR
.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3107
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e));
3152
throw new ArgumentException(
SR
.Format(
SR
.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3156
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e));
3224
throw new ArgumentException(
SR
.Format(
SR
.InvalidNullArgument, "e.SendPacketsElements"), nameof(e));
3228
throw new NotSupportedException(
SR
.net_notconnected);
3262
throw new ArgumentException(
SR
.Format(
SR
.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3344
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP));
3959
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName);
3964
throw new ArgumentException(
SR
.Format(
SR
.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
3968
throw new InvalidOperationException(
SR
.net_sockets_mustbind);
3979
throw new InvalidOperationException(
SR
.net_invasync);
System\Net\Sockets\Socket.Tasks.cs (12)
143
throw new ArgumentException(
SR
.net_invalidAddressList, nameof(addresses));
153
throw new InvalidOperationException(
SR
.net_sockets_mustnotlisten);
415
throw new ArgumentOutOfRangeException(nameof(receivedAddress),
SR
.net_sockets_address_small);
734
var ex = ExceptionDispatchInfo.SetCurrentStackTrace(new NotSupportedException(
SR
.net_notconnected));
815
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
901
new IOException(
SR
.Format(
SR
.net_io_readwritefailure, e.Message), e) :
1349
private static void ThrowIncorrectTokenException() => throw new InvalidOperationException(
SR
.InvalidOperation_IncorrectToken);
1374
new IOException(
SR
.Format(_isReadForCaching ?
SR
.net_io_readfailure :
SR
.net_io_writefailure, e.Message), e) :
System\Net\Sockets\Socket.Unix.cs (6)
22
throw new PlatformNotSupportedException(
SR
.net_sockets_duplicateandclose_notsupported);
31
throw new PlatformNotSupportedException(
SR
.net_sockets_duplicateandclose_notsupported);
167
throw new PlatformNotSupportedException(
SR
.net_sockets_connect_multiconnect_notsupported);
182
throw new InvalidOperationException(
SR
.Format(
SR
.net_sockets_namedmustnotbebound, propertyName));
197
throw new PlatformNotSupportedException(
SR
.net_sockets_transmitfileoptions_notsupported);
System\Net\Sockets\SocketAsyncEventArgs.cs (6)
160
throw new ArgumentException(
SR
.net_ambiguousbuffers);
341
throw new InvalidOperationException(
SR
.InvalidOperation_BufferNotExplicitArray);
388
throw new ArgumentException(
SR
.net_ambiguousbuffers);
415
throw new ArgumentException(
SR
.net_ambiguousbuffers);
541
throw new InvalidOperationException(
SR
.net_socketopinprogress);
588
throw new ArgumentException(
SR
.net_buffercounttoosmall, nameof(Count));
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (1)
50
throw new PlatformNotSupportedException(
SR
.net_sockets_accept_receive_notsupported);
System\Net\Sockets\SocketPal.Unix.cs (8)
39
throw new PlatformNotSupportedException(
SR
.net_sockets_dualmode_receivefrom_notsupported);
1395
throw new InvalidOperationException(
SR
.net_sockets_useblocking);
1417
throw new PlatformNotSupportedException(
SR
.PlatformNotSupported_IOControl);
1596
throw new PlatformNotSupportedException(
SR
.PlatformNotSupported_IPProtectionLevel);
1900
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList));
2007
throw new ArgumentException(
SR
.Format(
SR
.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList));
System\Net\Sockets\TCPClient.cs (3)
37
throw new ArgumentException(
SR
.Format(
SR
.net_protocol_invalid_family, "TCP"), nameof(family));
253
throw new InvalidOperationException(
SR
.net_notconnected);
System\Net\Sockets\TCPListener.cs (6)
100
throw new InvalidOperationException(
SR
.net_tcplistener_mustbestopped);
113
throw new InvalidOperationException(
SR
.net_tcplistener_mustbestopped);
177
throw new InvalidOperationException(
SR
.net_stopped);
188
throw new InvalidOperationException(
SR
.net_stopped);
200
throw new InvalidOperationException(
SR
.net_stopped);
227
throw new InvalidOperationException(
SR
.net_stopped);
System\Net\Sockets\UDPClient.cs (16)
33
throw new ArgumentException(
SR
.Format(
SR
.net_protocol_invalid_family, "UDP"), nameof(family));
61
throw new ArgumentException(
SR
.Format(
SR
.net_protocol_invalid_family, "UDP"), nameof(family));
325
throw new InvalidOperationException(
SR
.net_udpconnected);
334
throw new InvalidOperationException(
SR
.net_udpconnected);
349
throw new ArgumentException(
SR
.net_invalidAddressList, nameof(hostname));
402
throw new ArgumentException(
SR
.Format(
SR
.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr));
486
throw new ArgumentException(
SR
.Format(
SR
.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr));
609
throw new InvalidOperationException(
SR
.net_udpconnected);
864
throw new InvalidOperationException(
SR
.net_udpconnected);
899
throw new InvalidOperationException(
SR
.net_udpconnected);
944
throw new InvalidOperationException(
SR
.net_notconnected);
969
throw new InvalidOperationException(
SR
.net_notconnected);
System\Net\Sockets\UnixDomainSocketEndPoint.cs (2)
51
SR
.Format(
SR
.ArgumentOutOfRange_PathLengthInvalid, path, s_nativePathLength));