Język

DatagramSocketImpl.PeekDataAsync(DatagramPacket) Method

Definition

Runs PeekData(DatagramPacket) on a thread-pool thread to inspect the next datagram without consuming it.

protected System.Threading.Tasks.Task<int> PeekDataAsync(Java.Net.DatagramPacket? p);
member this.PeekDataAsync : Java.Net.DatagramPacket -> System.Threading.Tasks.Task<int>

Parameters

p
DatagramPacket

The packet into which PeekData(DatagramPacket) copies the next datagram without consuming it.

Returns

A task whose result is the sender's port number returned by PeekData(DatagramPacket).

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