SocketError Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines error codes for the Socket class.

Namespace:  System.Net.Sockets
Assembly:  System.Net (in System.Net.dll)

Syntax

'Declaration
Public Enumeration SocketError
public enum SocketError

Members

Member name Description
Supported by Silverlight for Windows Phone Success The Socket operation succeeded.
Supported by Silverlight for Windows Phone SocketError An unspecified Socket error has occurred.
Supported by Silverlight for Windows Phone Interrupted A blocking Socket call was canceled.
Supported by Silverlight for Windows Phone AccessDenied An attempt was made to access a Socket in a way that is forbidden by its access permissions.
Supported by Silverlight for Windows Phone Fault An invalid pointer address was detected by the underlying socket provider.
Supported by Silverlight for Windows Phone InvalidArgument An invalid argument was supplied to a Socket member.
Supported by Silverlight for Windows Phone TooManyOpenSockets There are too many open sockets in the underlying socket provider.
Supported by Silverlight for Windows Phone WouldBlock An operation on a nonblocking socket cannot be completed immediately.
Supported by Silverlight for Windows Phone InProgress A blocking operation is in progress.
Supported by Silverlight for Windows Phone AlreadyInProgress The nonblocking Socket already has an operation in progress.
Supported by Silverlight for Windows Phone NotSocket A Socket operation was attempted on a non-socket.
Supported by Silverlight for Windows Phone DestinationAddressRequired A required address was omitted from an operation on a Socket.
Supported by Silverlight for Windows Phone MessageSize The datagram is too long.
Supported by Silverlight for Windows Phone ProtocolType The protocol type is incorrect for this Socket.
Supported by Silverlight for Windows Phone ProtocolOption An unknown, invalid, or unsupported option or level was used with a Socket.
Supported by Silverlight for Windows Phone ProtocolNotSupported The protocol is not implemented or has not been configured.
Supported by Silverlight for Windows Phone SocketNotSupported The support for the specified socket type does not exist in this address family.
Supported by Silverlight for Windows Phone OperationNotSupported The address family is not supported by the protocol family.
Supported by Silverlight for Windows Phone ProtocolFamilyNotSupported The protocol family is not implemented or has not been configured.
Supported by Silverlight for Windows Phone AddressFamilyNotSupported 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.
Supported by Silverlight for Windows Phone AddressAlreadyInUse Only one use of an address is normally permitted.
Supported by Silverlight for Windows Phone AddressNotAvailable The selected IP address is not valid in this context.
Supported by Silverlight for Windows Phone NetworkDown The network is not available.
Supported by Silverlight for Windows Phone NetworkUnreachable No route to the remote host exists.
Supported by Silverlight for Windows Phone NetworkReset The application tried to set an option on a connection that has already timed out.
Supported by Silverlight for Windows Phone ConnectionAborted The connection was aborted by the .NET Framework or the underlying socket provider.
Supported by Silverlight for Windows Phone ConnectionReset The connection was reset by the remote peer.
Supported by Silverlight for Windows Phone NoBufferSpaceAvailable No free buffer space is available for a Socket operation.
Supported by Silverlight for Windows Phone IsConnected The Socket is already connected.
Supported by Silverlight for Windows Phone NotConnected The application tried to send or receive data, and the Socket is not connected.
Supported by Silverlight for Windows Phone Shutdown A request to send or receive data was disallowed because the Socket has already been closed.
Supported by Silverlight for Windows Phone TimedOut The connection attempt timed out, or the connected host has failed to respond.
Supported by Silverlight for Windows Phone ConnectionRefused The remote host is actively refusing a connection.
Supported by Silverlight for Windows Phone HostDown The operation failed because the remote host is down.
Supported by Silverlight for Windows Phone HostUnreachable There is no network route to the specified host.
Supported by Silverlight for Windows Phone ProcessLimit Too many processes are using the underlying socket provider.
Supported by Silverlight for Windows Phone SystemNotReady The network subsystem is unavailable.
Supported by Silverlight for Windows Phone VersionNotSupported The version of the underlying socket provider is out of range.
Supported by Silverlight for Windows Phone NotInitialized The underlying socket provider has not been initialized.
Supported by Silverlight for Windows Phone Disconnecting A graceful shutdown is in progress.
Supported by Silverlight for Windows Phone TypeNotFound The specified class was not found.
Supported by Silverlight for Windows Phone HostNotFound No such host is known. The name is not an official host name or alias.
Supported by Silverlight for Windows Phone TryAgain The name of the host could not be resolved. Try again later.
Supported by Silverlight for Windows Phone NoRecovery The error is unrecoverable or the requested database cannot be located.
Supported by Silverlight for Windows Phone NoData The requested name or IP address was not found on the name server.
Supported by Silverlight for Windows Phone IOPending The application has initiated an overlapped operation that cannot be completed immediately.
Supported by Silverlight for Windows Phone OperationAborted The overlapped operation was aborted due to the closure of the Socket.

Remarks

Most of these errors are returned by the underlying socket provider.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference