SocketTaskExtensions.ReceiveFromAsync(Socket, ArraySegment<Byte>, SocketFlags, EndPoint) メソッド

定義

指定したネットワーク デバイスからデータを受信します。Receives data from a specified network device.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::Net::Sockets::SocketReceiveFromResult> ^ ReceiveFromAsync(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.SocketReceiveFromResult> ReceiveFromAsync (this System.Net.Sockets.Socket socket, ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint);
static member ReceiveFromAsync : System.Net.Sockets.Socket * ArraySegment<byte> * System.Net.Sockets.SocketFlags * System.Net.EndPoint -> System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult>

パラメーター

socket
Socket

ReceiveFrom 操作を実行するソケット。The socket to perform the ReceiveFrom operation on.

buffer
ArraySegment<Byte>

受信したデータの格納場所である、Byte 型の配列。An array of type Byte that is the storage location for the received data.

socketFlags
SocketFlags

SocketFlags 値のビットごとの組み合わせ。A bitwise combination of the SocketFlags values.

remoteEndPoint
EndPoint

データのソースを表すエンドポイント。An EndPoint that represents the source of the data.

戻り値

SocketReceiveFromResult 構造体と共に完了する非同期タスク。An asynchronous Task that completes with a SocketReceiveFromResult struct.

適用対象