System.Net.Sockets.SocketException Class

The exception that is thrown when a socket error occurs.

See Also: SocketException Members

Syntax

public class SocketException : System.ComponentModel.Win32Exception

Remarks

A System.Net.Sockets.SocketException is thrown by the System.Net.Sockets.Socket and System.Net.Dns classes when an error occurs with the network.

The default constructor for the SocketException.#ctor class sets the SocketException.ErrorCode property to the last operating system socket error that occurred. For more information about socket error codes, see the Windows Sockets version 2 API error code documentation on MSDN.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0, 4.0.0.0