Język

DatagramSocket.ReceiveAsync(DatagramPacket) Method

Definition

Receives a datagram on a thread-pool thread.

public System.Threading.Tasks.Task ReceiveAsync(Java.Net.DatagramPacket? p);
member this.ReceiveAsync : Java.Net.DatagramPacket -> System.Threading.Tasks.Task

Parameters

p
DatagramPacket

The packet whose buffer receives the datagram data and whose address, port, and length are updated. Data that exceeds the packet's length is truncated.

Returns

A task that completes when Receive(DatagramPacket) returns and the packet contains the received datagram.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to