System.Net.Sockets Namespace
System.Net.Sockets命名空间

Provides a managed implementation of the Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
为需要严格控制网络访问的开发人员提供Windows Sockets(Winsock)接口的托管实现。

Classes  班级

HttpPolicyDownloaderProtocol

Downloads the policy file that an instance of the Socket class will use.

IPv6MulticastOption IPv6组播选项

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

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.
指定套接字在调用Close()或Close()方法后是否保持连接,以及如果仍要发送数据,套接字将保持连接的时间长度。

MulticastOption 多播选项

Contains IPAddress values used to join and drop multicast groups.
包含用于加入和删除多播组的IPAddress值。

NetworkStream 网络流

Provides the underlying stream of data for network access.
提供用于网络访问的底层数据流。

SafeSocketHandle 安全套接字句柄

Represents a wrapper class for a socket handle.
表示套接字句柄的包装类。

SendPacketsElement

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

Socket  插座

Implements the Berkeley sockets interface.
实现Berkeley套接字接口。

SocketAsyncEventArgs

Represents an asynchronous socket operation.
表示异步套接字操作。

SocketException

The exception that is thrown when a socket error occurs.
发生套接字错误时引发的异常。

SocketPolicy

Represents a policy file instance.

SocketTaskExtensions SocketTaskExtension

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

TcpClient

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

TcpListener 茨普雷

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

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.
提供用户数据报协议(UDP)网络服务。

UdpSingleSourceMulticastClient

A client receiver for multicast traffic from a single source, also known as Source Specific Multicast (SSM).

UnixDomainSocketEndPoint

Represents a Unix Domain Socket endpoint as a path.
将Unix域套接字终结点表示为路径。

Structs  结构

IPPacketInformation

Presents the packet information from a call to ReceiveMessageFrom(Byte[], Int32, Int32, SocketFlags, EndPoint, IPPacketInformation) or EndReceiveMessageFrom(IAsyncResult, SocketFlags, EndPoint, IPPacketInformation).
显示来自对ReceiveMessageFrom(Byte[],Int32,Int32,SocketFlages,Endpoint,IPPacketInformation)或EndReceiveMessageFrom(IAsyncResult,SocketFlages,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.
ReceiveFromAsync(Socket,ArraySegment<Byte>,SocketFlgs,Endpoint)操作的结果。

SocketReceiveMessageFromResult

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

UdpReceiveResult

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

Enums  枚举

AddressFamily 地址系列

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

IOControlCode

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

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

ProtocolFamily

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

ProtocolType

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

SelectMode 选择模式

Defines the polling modes for the Poll(Int32, SelectMode) method.
定义Poll(Int32,SelectMode)方法的轮询模式。

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.
定义Socket类的错误代码。

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.
定义SetSocketOption(SocketOptionLevel,SocketOptionName,Int32)和GetSocketOption(SocketOptionLevel,SocketOptionName)方法的套接字选项级别。

SocketOptionName

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

SocketShutdown 袜子

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

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.
TransmitFileOptions枚举定义文件传输请求中使用的值。

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.
TcpClient、TcpClient和UdpClient类封装了创建到Internet的TCP和UDP连接的详细信息。

See also 另请参阅