SocketTaskExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class contains extension methods to the Socket class.
public ref class SocketTaskExtensions abstract sealed
public static class SocketTaskExtensions
type SocketTaskExtensions = class
Public Module SocketTaskExtensions
- Inheritance
-
SocketTaskExtensions
Methods
AcceptAsync(Socket) |
Performs an asynchronous operation on to accept an incoming connection attempt on the socket. |
AcceptAsync(Socket, Socket) |
Performs an asynchronous operation on to accept an incoming connection attempt on the socket. |
ConnectAsync(Socket, EndPoint) |
Establishes a connection to a remote host. |
ConnectAsync(Socket, EndPoint, CancellationToken) |
Establishes a connection to a remote host. |
ConnectAsync(Socket, IPAddress, Int32) |
Establishes a connection to a remote host. The host is specified by an IP address and a port number. |
ConnectAsync(Socket, IPAddress, Int32, CancellationToken) |
Establishes a connection to a remote host, which is specified by an IP address and a port number. |
ConnectAsync(Socket, IPAddress[], Int32) |
Establishes a connection to a remote host. The host is specified by an array of IP addresses and a port number. |
ConnectAsync(Socket, IPAddress[], Int32, CancellationToken) |
Establishes a connection to a remote host, which is specified by an array of IP addresses and a port number. |
ConnectAsync(Socket, String, Int32) |
Establishes a connection to a remote host. The host is specified by a host name and a port number. |
ConnectAsync(Socket, String, Int32, CancellationToken) |
Establishes a connection to a remote host, which is specified by a host name and a port number. |
ReceiveAsync(Socket, ArraySegment<Byte>, SocketFlags) |
Receives data from a connected socket. |
ReceiveAsync(Socket, IList<ArraySegment<Byte>>, SocketFlags) |
Receives data from a connected socket. |
ReceiveAsync(Socket, Memory<Byte>, SocketFlags, CancellationToken) |
Receives data from a connected socket. |
ReceiveFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) |
Receives data from a specified network device. |
ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) |
Receives the specified number of bytes of data into the specified location of the data buffer, using the specified SocketFlags, and stores the endpoint and packet information. |
SendAsync(Socket, ArraySegment<Byte>, SocketFlags) |
Sends data to a connected socket. |
SendAsync(Socket, IList<ArraySegment<Byte>>, SocketFlags) |
Sends data to a connected socket. |
SendAsync(Socket, ReadOnlyMemory<Byte>, SocketFlags, CancellationToken) |
Sends data to a connected socket. |
SendToAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) |
Sends data asynchronously to a specific remote host. |
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈