SocketError Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines error codes for the Socket class.
public enum class SocketError
public enum SocketError
type SocketError =
Public Enum SocketError
- Inheritance
Fields
Name | Value | Description |
---|---|---|
SocketError | -1 | An unspecified Socket error has occurred. |
Success | 0 | The Socket operation succeeded. |
OperationAborted | 995 | The overlapped operation was aborted due to the closure of the Socket. |
IOPending | 997 | The application has initiated an overlapped operation that cannot be completed immediately. |
Interrupted | 10004 | A blocking Socket call was canceled. |
AccessDenied | 10013 | An attempt was made to access a Socket in a way that is forbidden by its access permissions. |
Fault | 10014 | An invalid pointer address was detected by the underlying socket provider. |
InvalidArgument | 10022 | An invalid argument was supplied to a Socket member. |
TooManyOpenSockets | 10024 | There are too many open sockets in the underlying socket provider. |
WouldBlock | 10035 | An operation on a nonblocking socket cannot be completed immediately. |
InProgress | 10036 | A blocking operation is in progress. |
AlreadyInProgress | 10037 | The nonblocking Socket already has an operation in progress. |
NotSocket | 10038 | A Socket operation was attempted on a non-socket. |
DestinationAddressRequired | 10039 | A required address was omitted from an operation on a Socket. |
MessageSize | 10040 | The datagram is too long. |
ProtocolType | 10041 | The protocol type is incorrect for this Socket. |
ProtocolOption | 10042 | An unknown, invalid, or unsupported option or level was used with a Socket. |
ProtocolNotSupported | 10043 | The protocol is not implemented or has not been configured. |
SocketNotSupported | 10044 | The support for the specified socket type does not exist in this address family. |
OperationNotSupported | 10045 | The address family is not supported by the protocol family. |
ProtocolFamilyNotSupported | 10046 | The protocol family is not implemented or has not been configured. |
AddressFamilyNotSupported | 10047 | The address family specified is not supported. This error is returned if the IPv6 address family was specified and the IPv6 stack is not installed on the local machine. This error is returned if the IPv4 address family was specified and the IPv4 stack is not installed on the local machine. |
AddressAlreadyInUse | 10048 | Only one use of an address is normally permitted. |
AddressNotAvailable | 10049 | The selected IP address is not valid in this context. |
NetworkDown | 10050 | The network is not available. |
NetworkUnreachable | 10051 | No route to the remote host exists. |
NetworkReset | 10052 | The application tried to set KeepAlive on a connection that has already timed out. |
ConnectionAborted | 10053 | The connection was aborted by .NET or the underlying socket provider. |
ConnectionReset | 10054 | The connection was reset by the remote peer. |
NoBufferSpaceAvailable | 10055 | No free buffer space is available for a Socket operation. |
IsConnected | 10056 | The Socket is already connected. |
NotConnected | 10057 | The application tried to send or receive data, and the Socket is not connected. |
Shutdown | 10058 | A request to send or receive data was disallowed because the Socket has already been closed. |
TimedOut | 10060 | The connection attempt timed out, or the connected host has failed to respond. |
ConnectionRefused | 10061 | The remote host is actively refusing a connection. |
HostDown | 10064 | The operation failed because the remote host is down. |
HostUnreachable | 10065 | There is no network route to the specified host. |
ProcessLimit | 10067 | Too many processes are using the underlying socket provider. |
SystemNotReady | 10091 | The network subsystem is unavailable. |
VersionNotSupported | 10092 | The version of the underlying socket provider is out of range. |
NotInitialized | 10093 | The underlying socket provider has not been initialized. |
Disconnecting | 10101 | A graceful shutdown is in progress. |
TypeNotFound | 10109 | The specified class was not found. |
HostNotFound | 11001 | No such host is known. The name is not an official host name or alias. |
TryAgain | 11002 | The name of the host could not be resolved. Try again later. |
NoRecovery | 11003 | The error is unrecoverable or the requested database cannot be located. |
NoData | 11004 | The requested name or IP address was not found on the name server. |
Remarks
Most of these errors are returned by the underlying socket provider.