System.Net.Sockets Namespace

System.Net.Sockets 命名空间为需要严密控制网络访问的开发人员提供了 Windows Sockets (Winsock) 接口的托管实现。 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.

HttpPolicyDownloaderProtocol

下载 Socket 类的实例将使用的策略文件。 Downloads the policy file that an instance of the Socket class will use.

IPv6MulticastOption

包含用于加入 IPv6 多路广播组的选项值。 Contains option values for joining an IPv6 multicast group.

LingerOption

指定在调用 SocketClose() 方法之后,如果仍有数据要发送,Close() 是否保持连接以及保持多长时间。 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

包含用于联接和丢弃多路广播组的 IPAddress 值。 Contains IPAddress values used to join and drop multicast groups.

NetworkStream

为网络访问提供数据的基础流。 Provides the underlying stream of data for network access.

SendPacketsElement

表示 SendPacketsElement 数组中的一个元素。 Represents an element in a SendPacketsElement array.

Socket

实现 Berkeley 套接字接口。 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

此类包含 Socket 类的扩展方法。 This class contains extension methods to the Socket class.

TcpClient

为 TCP 网络服务提供客户端连接。 Provides client connections for TCP network services.

TcpListener

侦听来自 TCP 网络客户端的连接。 Listens for connections from TCP network clients.

UdpAnySourceMulticastClient

从任意源接收多播流量的客户端接收器,亦称为任意源多播 (ASM) 或 Internet 标准多播 (ISM)。 A client receiver for multicast traffic from any source, also known as Any Source Multicast (ASM) or Internet Standard Multicast (ISM).

UdpClient

提供用户数据报协议 (UDP) 网络服务。 Provides User Datagram Protocol (UDP) network services.

UdpSingleSourceMulticastClient

一个从单一源接收多播流量的客户端,亦称为源特定多播 (SSM)。 A client receiver for multicast traffic from a single source, also known as Source Specific Multicast (SSM).

UnixDomainSocketEndPoint

结构

IPPacketInformation

通过调用 ReceiveMessageFrom(Byte[], Int32, Int32, SocketFlags, EndPoint, IPPacketInformation)EndReceiveMessageFrom(IAsyncResult, SocketFlags, EndPoint, IPPacketInformation) 显示数据包信息。 Presents the packet information from a call to ReceiveMessageFrom(Byte[], Int32, Int32, SocketFlags, EndPoint, IPPacketInformation) or EndReceiveMessageFrom(IAsyncResult, SocketFlags, EndPoint, IPPacketInformation).

SocketInformation

对复制 Socket 时所需的信息进行封装。 Encapsulates the information that is necessary to duplicate a Socket.

SocketReceiveFromResult

ReceiveFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) 操作的结果。 The result of a ReceiveFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) operation.

SocketReceiveMessageFromResult

ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) 操作的结果。 The result of a ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) operation.

UdpReceiveResult

呈现 UDP 从对 ReceiveAsync() 方法的调用接收结果信息。 Presents UDP receive result information from a call to the ReceiveAsync() method.

枚举

AddressFamily

指定 Socket 类的实例可以使用的寻址方案。 Specifies the addressing scheme that an instance of the Socket class can use.

IOControlCode

指定 IOControl(Int32, Byte[], Byte[]) 方法支持的 IO 控制代码。 Specifies the IO control codes supported by the IOControl(Int32, Byte[], Byte[]) method.

IPProtectionLevel

一个可用于将 IPv6 套接字限制为一个指定范围的值,例如限制为具有相同的链接本地或站点本地前缀的地址。 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

指定 Socket 类的实例可以使用的协议类型。 Specifies the type of protocol that an instance of the Socket class can use.

ProtocolType

指定 Socket 类支持的协议。 Specifies the protocols that the Socket class supports.

SelectMode

Poll(Int32, 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

定义 Socket 类的错误代码。 Defines error codes for the Socket class.

SocketFlags

指定套接字发送和接收行为。 Specifies socket send and receive behaviors.

SocketInformationOptions

描述 Socket 的状态。 Describes states for a Socket.

SocketOptionLevel

SetSocketOption(SocketOptionLevel, SocketOptionName, Int32)GetSocketOption(SocketOptionLevel, SocketOptionName) 方法定义套接字选项级别。 Defines socket option levels for the SetSocketOption(SocketOptionLevel, SocketOptionName, Int32) and GetSocketOption(SocketOptionLevel, SocketOptionName) methods.

SocketOptionName

定义配置选项名称。 Defines configuration option names.

SocketShutdown

定义 Shutdown(SocketShutdown) 方法使用的常量。 Defines constants that are used by the Shutdown(SocketShutdown) method.

SocketType

指定 Socket 类的实例表示的套接字类型。 Specifies the type of socket that an instance of the Socket class represents.

TransmitFileOptions

TransmitFileOptions 枚举定义文件传输请求中使用的值。 The TransmitFileOptions enumeration defines values used in file transfer requests.

委托

SecurityCriticalAction

表示安全关键操作。 Represents a security critical action.

注解

TcpClientTcpListener,和UdpClient类封装了创建与 Internet 的 TCP 和 UDP 连接的详细信息。The TcpClient, TcpListener, and UdpClient classes encapsulate the details of creating TCP and UDP connections to the Internet.