System.Net.Sockets
Namespace
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.
Classes
| HttpPolicyDownloaderProtocol |
Downloads the policy file that an instance of the Socket class will use. |
| IPv6MulticastOption |
Contains option values for joining an IPv6 multicast group. |
| LingerOption |
Specifies whether a Socket will remain connected after a call to the Close() or Close() methods and the length of time it will remain connected, if data remains to be sent. |
| MulticastOption |
Contains IPAddress values used to join and drop multicast groups. |
| NetworkStream |
Provides the underlying stream of data for network access. |
| SendPacketsElement |
Represents an element in a SendPacketsElement array. |
| Socket |
Implements the Berkeley sockets interface. |
| SocketAsyncEventArgs |
Represents an asynchronous socket operation. |
| SocketException |
The exception that is thrown when a socket error occurs. |
| SocketPolicy |
Represents a policy file instance. |
| SocketTaskExtensions |
This class contains extension methods to the Socket class. |
| TcpClient |
Provides client connections for TCP network services. |
| TcpListener |
Listens for connections from TCP network clients. |
| UdpAnySourceMulticastClient |
A client receiver for multicast traffic from any source, also known as Any Source Multicast (ASM) or Internet Standard Multicast (ISM). |
| UdpClient |
Provides User Datagram Protocol (UDP) network services. |
| UdpSingleSourceMulticastClient |
A client receiver for multicast traffic from a single source, also known as Source Specific Multicast (SSM). |
Structs
| IPPacketInformation |
Presents the packet information from a call to ReceiveMessageFrom(Byte[], Int32, Int32, SocketFlags, EndPoint, IPPacketInformation) or EndReceiveMessageFrom(IAsyncResult, SocketFlags, EndPoint, IPPacketInformation). |
| SocketInformation |
Encapsulates the information that is necessary to duplicate a Socket. |
| SocketReceiveFromResult |
The result of a ReceiveFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) operation. |
| SocketReceiveMessageFromResult |
The result of a ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) operation. |
| UdpReceiveResult |
Presents UDP receive result information from a call to the ReceiveAsync() method. |
Enums
| AddressFamily |
Specifies the addressing scheme that an instance of the Socket class can use. |
| IOControlCode |
Specifies the IO control codes supported by the IOControl(Int32, Byte[], Byte[]) method. |
| IPProtectionLevel |
A value that enables restriction of an IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix. |
| ProtocolFamily |
Specifies the type of protocol that an instance of the Socket class can use. |
| ProtocolType |
Specifies the protocols that the Socket class supports. |
| SelectMode |
Defines the polling modes for the Poll(Int32, SelectMode) method. |
| SocketAsyncOperation |
The type of asynchronous socket operation most recently performed with this context object. |
| SocketClientAccessPolicyProtocol |
Specifies the method to download a client access policy file. |
| SocketError |
Defines error codes for the Socket class. |
| SocketFlags |
Specifies socket send and receive behaviors. |
| SocketInformationOptions |
Describes states for a Socket. |
| SocketOptionLevel |
Defines socket option levels for the SetSocketOption(SocketOptionLevel, SocketOptionName, Int32) and GetSocketOption(SocketOptionLevel, SocketOptionName) methods. |
| SocketOptionName |
Defines configuration option names. |
| SocketShutdown |
Defines constants that are used by the Shutdown(SocketShutdown) method. |
| SocketType |
Specifies the type of socket that an instance of the Socket class represents. |
| TransmitFileOptions |
The TransmitFileOptions enumeration defines values used in file transfer requests. |
Delegates
| SecurityCriticalAction |
Represents a security critical action. |
Remarks
The TcpClient, TcpListener, and UdpClient classes encapsulate the details of creating TCP and UDP connections to the Internet.