Udostępnij za pośrednictwem


DatagramPacket.Length Property

Definition

Returns the length of the data to be sent or the length of the data received. -or- Set the length for this packet.

public int Length { [Android.Runtime.Register("getLength", "()I", "")] get; [Android.Runtime.Register("setLength", "(I)V", "")] set; }
[<get: Android.Runtime.Register("getLength", "()I", "")>]
[<set: Android.Runtime.Register("setLength", "(I)V", "")>]
member this.Length : int with get, set

Property Value

the length of the data to be sent or the length of the data received.

Attributes

Remarks

Property getter documentation:

Returns the length of the data to be sent or the length of the data received.

Java documentation for java.net.DatagramPacket.getLength().

Property setter documentation:

Set the length for this packet. The length of the packet is the number of bytes from the packet's data buffer that will be sent, or the number of bytes of the packet's data buffer that will be used for receiving data. The length must be lesser or equal to the offset plus the length of the packet's buffer.

Added in 1.1.

Java documentation for java.net.DatagramPacket.setLength(int).

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