Edit

Share via


SocketTaskExtensions Class

Definition

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