The System.Net.Sockets namespace provides a managed implementation of the Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
The System.Net.Sockets.TcpClient, System.Net.Sockets.TcpListener, and System.Net.Sockets.UdpClient classes encapsulate the details of creating TCP and UDP connections to the Internet.
Type | Reason |
---|---|
AddressFamily |
Specifies the addressing scheme that an instance of the System.Net.Sockets.Socket class can use. |
IOControlCode |
Specifies the IO control codes supported by the System.Net.Sockets.Socket.IOControl(int, Byte[], Byte[]) method. |
IPPacketInformation |
Presents the packet information from a call to System.Net.Sockets.Socket.ReceiveMessageFrom(Byte[], int, int, System.Net.Sockets.SocketFlags@, System.Net.EndPoint@, System.Net.Sockets.IPPacketInformation@) or System.Net.Sockets.Socket.EndReceiveMessageFrom(IAsyncResult, System.Net.Sockets.SocketFlags@, System.Net.EndPoint@, System.Net.Sockets.IPPacketInformation@). |
IPv6MulticastOption |
Contains option values for joining an IPv6 multicast group. |
LingerOption |
Specifies whether a System.Net.Sockets.Socket will remain connected after a call to the System.Net.Sockets.Socket.Close or System.Net.Sockets.TcpClient.Close methods and the length of time it will remain connected, if data remains to be sent. |
MulticastOption |
Contains System.Net.IPAddress values used to join and drop multicast groups. |
NetworkStream |
Provides the underlying stream of data for network access. |
ProtocolFamily |
Specifies the type of protocol that an instance of the System.Net.Sockets.Socket class can use. |
ProtocolType |
Specifies the protocols that the System.Net.Sockets.Socket class supports. |
SelectMode |
Defines the polling modes for the System.Net.Sockets.Socket.Poll(int, System.Net.Sockets.SelectMode) method. |
SendPacketsElement |
Represents an element in a System.Net.Sockets.SendPacketsElement array. |
Socket |
Implements the Berkeley sockets interface. |
SocketAsyncEventArgs |
Represents an asynchronous socket operation. |
SocketAsyncOperation |
The type of asynchronous socket operation most recently performed with this context object. |
SocketError |
Defines error codes for the System.Net.Sockets.Socket class. |
SocketException |
The exception that is thrown when a socket error occurs. |
SocketFlags |
Specifies socket send and receive behaviors. |
SocketInformation |
Encapsulates the information that is necessary to duplicate a System.Net.Sockets.Socket. |
SocketInformationOptions |
Describes states for a System.Net.Sockets.Socket. |
SocketOptionLevel |
Defines socket option levels for the System.Net.Sockets.Socket.SetSocketOption(System.Net.Sockets.SocketOptionLevel, System.Net.Sockets.SocketOptionName, int) and System.Net.Sockets.Socket.GetSocketOption(System.Net.Sockets.SocketOptionLevel, System.Net.Sockets.SocketOptionName) methods. |
SocketOptionName |
Defines configuration option names. |
SocketShutdown |
Defines constants that are used by the System.Net.Sockets.Socket.Shutdown(System.Net.Sockets.SocketShutdown) method. |
SocketType |
Specifies the type of socket that an instance of the System.Net.Sockets.Socket class represents. |
TcpClient |
Provides client connections for TCP network services. |
TcpListener |
Listens for connections from TCP network clients. |
TransmitFileOptions |
The System.Net.Sockets.TransmitFileOptions enumeration defines values used in file transfer requests. |
UdpClient |
Provides User Datagram Protocol (UDP) network services. |
UdpReceiveResult |
Presents UDP receive result information from a call to the System.Net.Sockets.UdpClient.ReceiveAsync method. |