182 references to SR
System.Net.Sockets (182)
System\Net\Sockets\NetworkStream.cs (33)
55throw new IOException(SR.net_sockets_blocking); 59throw new IOException(SR.net_notconnected); 63throw new IOException(SR.net_notstream); 136throw new ArgumentOutOfRangeException(nameof(value), SR.net_io_timeout_use_gt_zero); 163throw new ArgumentOutOfRangeException(nameof(value), SR.net_io_timeout_use_gt_zero); 188throw new NotSupportedException(SR.net_noseek); 197throw new NotSupportedException(SR.net_noseek); 202throw new NotSupportedException(SR.net_noseek); 210throw new NotSupportedException(SR.net_noseek); 235throw new InvalidOperationException(SR.net_writeonlystream); 244throw WrapException(SR.net_io_readfailure, exception); 261if (!CanRead) throw new InvalidOperationException(SR.net_writeonlystream); 269throw WrapException(SR.net_io_readfailure, exception); 305throw new InvalidOperationException(SR.net_readonlystream); 316throw WrapException(SR.net_io_writefailure, exception); 334if (!CanWrite) throw new InvalidOperationException(SR.net_readonlystream); 342throw WrapException(SR.net_io_writefailure, exception); 441throw new InvalidOperationException(SR.net_writeonlystream); 456throw WrapException(SR.net_io_readfailure, exception); 481throw WrapException(SR.net_io_readfailure, exception); 507throw new InvalidOperationException(SR.net_readonlystream); 523throw WrapException(SR.net_io_writefailure, exception); 544throw WrapException(SR.net_io_writefailure, exception); 569throw new InvalidOperationException(SR.net_writeonlystream); 582throw WrapException(SR.net_io_readfailure, exception); 592throw new InvalidOperationException(SR.net_writeonlystream); 605throw WrapException(SR.net_io_readfailure, exception); 630throw new InvalidOperationException(SR.net_readonlystream); 642throw WrapException(SR.net_io_writefailure, exception); 652throw new InvalidOperationException(SR.net_readonlystream); 664throw WrapException(SR.net_io_writefailure, exception); 681throw new NotSupportedException(SR.net_noseek); 721return new IOException(SR.Format(resourceFormatString, innerException.Message), innerException);
System\Net\Sockets\SendPacketsElement.cs (1)
54throw new ArgumentException(SR.net_sockets_sendpackelement_FileStreamMustBeAsync, nameof(fileStream));
System\Net\Sockets\Socket.cs (88)
243throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 506throw new InvalidOperationException(SR.net_sockets_mustnotbebound); 625throw new NotSupportedException(SR.net_invalidversion); 646throw new NotSupportedException(SR.net_invalidversion); 663throw new NotSupportedException(SR.net_invalidversion); 677throw new NotSupportedException(SR.net_invalidversion); 700throw new NotSupportedException(SR.net_invalidversion); 718throw new NotSupportedException(SR.net_invalidversion); 762throw new NotSupportedException(SR.net_invalidversion); 839throw new InvalidOperationException(SR.net_sockets_disconnectedConnect); 844throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 860throw new NotSupportedException(SR.net_invalidversion); 892throw new NotSupportedException(SR.net_invalidversion); 912throw new NotSupportedException(SR.net_invalidversion); 939throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses)); 947throw new NotSupportedException(SR.net_invalidversion); 977throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 1035throw new InvalidOperationException(SR.net_sockets_mustbind); 1040throw new InvalidOperationException(SR.net_sockets_mustlisten); 1045throw new InvalidOperationException(SR.net_sockets_disconnectedAccept); 1146throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1332throw new InvalidOperationException(SR.net_sockets_blocking); 1337throw new NotSupportedException(SR.net_notconnected); 1640throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1758throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP)); 1762throw new InvalidOperationException(SR.net_sockets_mustbind); 2029throw new ArgumentOutOfRangeException(nameof(receivedAddress), SR.net_sockets_address_small); 2130throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue)); 2134throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue)); 2143throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue)); 2153throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue)); 2159throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue)); 2316throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level)); 2329throw new NotSupportedException(SR.net_invalidversion); 2403throw new ArgumentNullException(null, SR.net_sockets_empty_select); 2408throw new ArgumentOutOfRangeException(nameof(checkRead), SR.Format(SR.net_sockets_toolarge_select, nameof(checkRead), MaxSelect.ToString())); 2412throw new ArgumentOutOfRangeException(nameof(checkWrite), SR.Format(SR.net_sockets_toolarge_select, nameof(checkWrite), MaxSelect.ToString())); 2416throw new ArgumentOutOfRangeException(nameof(checkError), SR.Format(SR.net_sockets_toolarge_select, nameof(checkError), MaxSelect.ToString())); 2569throw new NotSupportedException(SR.net_notconnected); 2698throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2738throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2847throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2851throw new InvalidOperationException(SR.net_sockets_mustbind); 2855throw new InvalidOperationException(SR.net_sockets_mustlisten); 2899throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 2904throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 2921throw new NotSupportedException(SR.net_invalidversion); 2941throw new NotSupportedException(SR.net_invalidversion); 2999throw new ArgumentException(SR.Format(SR.net_sockets_invalid_connect_algorithm, connectAlgorithm), nameof(connectAlgorithm)); 3004throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 3008throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3112throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 3117throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3121throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 3166throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3170throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3238throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3242throw new NotSupportedException(SR.net_notconnected); 3276throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3358throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3973throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3978throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName); 3982throw new InvalidOperationException(SR.net_sockets_mustbind); 3993throw new InvalidOperationException(SR.net_invasync);
System\Net\Sockets\Socket.Tasks.cs (12)
143throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 153throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 415throw new ArgumentOutOfRangeException(nameof(receivedAddress), SR.net_sockets_address_small); 734var ex = ExceptionDispatchInfo.SetCurrentStackTrace(new NotSupportedException(SR.net_notconnected)); 815throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 901new IOException(SR.Format(SR.net_io_readwritefailure, e.Message), e) : 1349private static void ThrowIncorrectTokenException() => throw new InvalidOperationException(SR.InvalidOperation_IncorrectToken); 1374new IOException(SR.Format(_isReadForCaching ? SR.net_io_readfailure : SR.net_io_writefailure, e.Message), e) :
System\Net\Sockets\Socket.Unix.cs (6)
22throw new PlatformNotSupportedException(SR.net_sockets_duplicateandclose_notsupported); 31throw new PlatformNotSupportedException(SR.net_sockets_duplicateandclose_notsupported); 167throw new PlatformNotSupportedException(SR.net_sockets_connect_multiconnect_notsupported); 182throw new InvalidOperationException(SR.Format(SR.net_sockets_namedmustnotbebound, propertyName)); 197throw new PlatformNotSupportedException(SR.net_sockets_transmitfileoptions_notsupported);
System\Net\Sockets\SocketAsyncEventArgs.cs (6)
160throw new ArgumentException(SR.net_ambiguousbuffers); 341throw new InvalidOperationException(SR.InvalidOperation_BufferNotExplicitArray); 388throw new ArgumentException(SR.net_ambiguousbuffers); 415throw new ArgumentException(SR.net_ambiguousbuffers); 545throw new InvalidOperationException(SR.net_socketopinprogress); 592throw new ArgumentException(SR.net_buffercounttoosmall, nameof(Count));
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (1)
50throw new PlatformNotSupportedException(SR.net_sockets_accept_receive_notsupported);
System\Net\Sockets\SocketPal.Unix.cs (8)
39throw new PlatformNotSupportedException(SR.net_sockets_dualmode_receivefrom_notsupported); 1395throw new InvalidOperationException(SR.net_sockets_useblocking); 1417throw new PlatformNotSupportedException(SR.PlatformNotSupported_IOControl); 1596throw new PlatformNotSupportedException(SR.PlatformNotSupported_IPProtectionLevel); 1900throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList)); 2007throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList));
System\Net\Sockets\TCPClient.cs (3)
37throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "TCP"), nameof(family)); 253throw new InvalidOperationException(SR.net_notconnected);
System\Net\Sockets\TCPListener.cs (6)
100throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 113throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 177throw new InvalidOperationException(SR.net_stopped); 188throw new InvalidOperationException(SR.net_stopped); 200throw new InvalidOperationException(SR.net_stopped); 227throw new InvalidOperationException(SR.net_stopped);
System\Net\Sockets\UDPClient.cs (16)
33throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "UDP"), nameof(family)); 61throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "UDP"), nameof(family)); 325throw new InvalidOperationException(SR.net_udpconnected); 334throw new InvalidOperationException(SR.net_udpconnected); 349throw new ArgumentException(SR.net_invalidAddressList, nameof(hostname)); 402throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr)); 486throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr)); 609throw new InvalidOperationException(SR.net_udpconnected); 864throw new InvalidOperationException(SR.net_udpconnected); 899throw new InvalidOperationException(SR.net_udpconnected); 944throw new InvalidOperationException(SR.net_notconnected); 969throw new InvalidOperationException(SR.net_notconnected);
System\Net\Sockets\UnixDomainSocketEndPoint.cs (2)
51SR.Format(SR.ArgumentOutOfRange_PathLengthInvalid, path, s_nativePathLength));