SocketTaskExtensions.ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) SocketTaskExtensions.ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) SocketTaskExtensions.ReceiveMessageFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) Method

Definición

Recibe el número especificado de bytes de datos en la ubicación especificada del búfer de datos, mediante el elemento SocketFlags especificado y almacena el punto de conexión y la información del paquete.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.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::Net::Sockets::SocketReceiveMessageFromResult> ^ ReceiveMessageFromAsync(System::Net::Sockets::Socket ^ socket, ArraySegment<System::Byte> buffer, System::Net::Sockets::SocketFlags socketFlags, System::Net::EndPoint ^ remoteEndPoint);
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync (this System.Net.Sockets.Socket socket, ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint);
static member ReceiveMessageFromAsync : System.Net.Sockets.Socket * ArraySegment<byte> * System.Net.Sockets.SocketFlags * System.Net.EndPoint -> System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult>

Parámetros

socket
Socket Socket Socket

Socket en el que realizar la operación.The socket to perform the operation on.

buffer
ArraySegment<Byte>

Matriz que es la ubicación de almacenamiento para los datos recibidos.An array that is the storage location for received data.

socketFlags
SocketFlags SocketFlags SocketFlags

Combinación bit a bit de los valores de SocketFlags.A bitwise combination of the SocketFlags values.

remoteEndPoint
EndPoint EndPoint EndPoint

EndPoint que representa el servidor remoto.An EndPoint, that represents the remote server.

Devoluciones

Tarea asincrónica que se completa con una estructura SocketReceiveMessageFromResult.An asynchronous Task that completes with a SocketReceiveMessageFromResult struct.

Se aplica a