Język

DatagramChannel.ReceiveAsync(ByteBuffer) Method

Definition

Runs the synchronous receive operation in a task to receive one datagram into a buffer.

public System.Threading.Tasks.Task<Java.Net.SocketAddress?> ReceiveAsync(Java.Nio.ByteBuffer? dst);
member this.ReceiveAsync : Java.Nio.ByteBuffer -> System.Threading.Tasks.Task<Java.Net.SocketAddress>

Parameters

dst
ByteBuffer

The destination buffer. Its position advances by the number of bytes copied; its limit is unchanged. Any part of the datagram that does not fit is discarded.

Returns

A task whose result is the sender's address, or null when this channel is non-blocking and no datagram is available.

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