System.Net.Sockets.SocketException

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

Represents an error that occurs during a socket operation.

Constructors

Properties

Methods

Remarks

The SocketException class provides specific information about network errors that occur during socket operations. The ErrorCode property contains a specific system error code that can be used to diagnose the problem further. Common error codes include:

You can use the ErrorCode to look up the specific error message provided by the operating system or network stack.