System.Net.Sockets 命名空間

System.Net.Sockets 命名空間提供 Windows Sockets (Winsock) 介面的 Managed 實作 (Implementation) 給需要嚴密控制網路存取的開發人員。 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

包含用來聯結 (Join) 和卸除多點傳送群組的 IPAddress 值。Contains IPAddress values used to join and drop multicast groups.

NetworkStream

提供基礎資料流以進行網路存取。Provides the underlying stream of data for network access.

SafeSocketHandle

表示通訊端控制代碼的包裝函式類別。Represents a wrapper class for a socket handle.

SendPacketsElement

表示 SendPacketsElement 陣列中的元素。Represents an element in a SendPacketsElement array.

Socket

實作 Berkeley 通訊端介面。Implements the Berkeley sockets interface.

SocketAsyncEventArgs

代表非同步通訊端作業。Represents an asynchronous socket operation.

SocketException

當發生通訊端 (Socket) 錯誤時所擲回的例外狀況。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,Any Source Multicast) 或網路標準多點傳送 (ISM,Internet Standard Multicast)。A client receiver for multicast traffic from any source, also known as Any Source Multicast (ASM) or Internet Standard Multicast (ISM).

UdpClient

提供使用者資料包通訊協定 (User Datagram Protocol,UDP) 網路服務。Provides User Datagram Protocol (UDP) network services.

UdpSingleSourceMulticastClient

單一來源的多點流量的用戶端接收器,也稱為特定來源多點傳送 (SSM,Source Specific Multicast)。A client receiver for multicast traffic from a single source, also known as Source Specific Multicast (SSM).

UnixDomainSocketEndPoint

以路徑表示 UNIX 網域通訊端端點。Represents a Unix Domain Socket endpoint as a path.

結構

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

呈現呼叫 ReceiveAsync() 方法的 UDP 接收結果資訊。Presents UDP receive result information from a call to the ReceiveAsync() method.

列舉

AddressFamily

指定 Socket 類別的執行個體 (Instance) 可以使用的位址配置。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 類別可以使用的執行個體 (Instance) 通訊協定型別。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) 方法的通訊端 (Socket) 選項層級。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 類別的執行個體 (Instance) 所表示的通訊端 (Socket) 類型。Specifies the type of socket that an instance of the Socket class represents.

TransmitFileOptions

TransmitFileOptions 列舉型別 (Enumeration) 定義檔案傳輸要求中使用的值。The TransmitFileOptions enumeration defines values used in file transfer requests.

委派

SecurityCriticalAction

表示安全性關鍵動作。Represents a security critical action.

備註

TcpClientTcpListener,和UdpClient類別會封裝建立 TCP 和 UDP 網際網路連線的詳細資料。The TcpClient, TcpListener, and UdpClient classes encapsulate the details of creating TCP and UDP connections to the Internet.

另請參閱