SocketError Enumeration

Namespace: System.Net.Sockets
Assembly: System.Net.Sockets.dll

Indicates the type of error that occurred when a socket operation failed.

Syntax

public enum SocketError

Members

Success

The socket operation completed successfully.

Success = 0

ConnectionAborted

The connection was aborted by the remote host.

ConnectionAborted = 10053

ConnectionRefused

The connection was refused by the remote host.

ConnectionRefused = 10061

ConnectionReset

The connection was reset by the remote host.

ConnectionReset = 10054

HostDown

The remote host is unreachable.

HostDown = 11004

HostNotFound

The remote host was not found.

HostNotFound = 11001

InvalidArgument

One or more arguments are invalid.

InvalidArgument = 10022

NetworkDown

The network is unavailable.

NetworkDown = 11002

NetworkUnreachable

The network is unreachable.

NetworkUnreachable = 10051

NoBufferSpaceAvailable

No buffer space is available.

NoBufferSpaceAvailable = 10055

OperationAborted

The socket operation was canceled.

OperationAborted = 995

TimedOut

The socket operation timed out.

TimedOut = 10060

WouldBlock

The operation would block.

WouldBlock = 10035

Remarks

The SocketError enumeration is used to report errors that occur during socket operations. Most of these error codes correspond to standard Winsock error codes.

See Also