179 references to SR
System.Net.Sockets (179)
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 (85)
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)); 1330throw new NotSupportedException(SR.net_notconnected); 1633throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1751throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP)); 1755throw new InvalidOperationException(SR.net_sockets_mustbind); 2022throw new ArgumentOutOfRangeException(nameof(receivedAddress), SR.net_sockets_address_small); 2123throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue)); 2127throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue)); 2136throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue)); 2146throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue)); 2152throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue)); 2309throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level)); 2322throw new NotSupportedException(SR.net_invalidversion); 2396throw new ArgumentNullException(null, SR.net_sockets_empty_select); 2401throw new ArgumentOutOfRangeException(nameof(checkRead), SR.Format(SR.net_sockets_toolarge_select, nameof(checkRead), MaxSelect.ToString())); 2405throw new ArgumentOutOfRangeException(nameof(checkWrite), SR.Format(SR.net_sockets_toolarge_select, nameof(checkWrite), MaxSelect.ToString())); 2409throw new ArgumentOutOfRangeException(nameof(checkError), SR.Format(SR.net_sockets_toolarge_select, nameof(checkError), MaxSelect.ToString())); 2562throw new NotSupportedException(SR.net_notconnected); 2691throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2731throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2840throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2844throw new InvalidOperationException(SR.net_sockets_mustbind); 2848throw new InvalidOperationException(SR.net_sockets_mustlisten); 2892throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 2897throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 2914throw new NotSupportedException(SR.net_invalidversion); 2934throw new NotSupportedException(SR.net_invalidversion); 2990throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2994throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3098throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 3103throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3107throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 3152throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3156throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3224throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3228throw new NotSupportedException(SR.net_notconnected); 3262throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3344throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3959throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3964throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName); 3968throw new InvalidOperationException(SR.net_sockets_mustbind); 3979throw 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); 541throw new InvalidOperationException(SR.net_socketopinprogress); 588throw 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));