SocketException Class
The exception that is thrown when a socket error occurs.
For a list of all members of this type, see SocketException Members.
System.Object
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.ComponentModel.Win32Exception
System.Net.Sockets.SocketException
[Visual Basic] <Serializable> Public Class SocketException Inherits Win32Exception [C#] [Serializable] public class SocketException : Win32Exception [C++] [Serializable] public __gc class SocketException : public Win32Exception [JScript] public Serializable class SocketException extends Win32Exception
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
A SocketException is thrown by the Socket and Dns classes when an error occurs with the network.
The default constructor for the SocketException class sets the ErrorCode property to the last operating system socket error that occurred. For more information about socket error codes, see the Windows Socket Version 2 API error code documentation in MSDN.
Requirements
Namespace: System.Net.Sockets
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System (in System.dll)
See Also
SocketException Members | System.Net.Sockets Namespace | Exception