DatagramPacket.SetData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetData(Byte[]) |
Set the data buffer for this packet. |
SetData(Byte[], Int32, Int32) |
Set the data buffer for this packet. |
SetData(Byte[])
Set the data buffer for this packet.
[Android.Runtime.Register("setData", "([B)V", "")]
public void SetData (byte[]? buf);
[<Android.Runtime.Register("setData", "([B)V", "")>]
member this.SetData : byte[] -> unit
Parameters
- buf
- Byte[]
the buffer to set for this packet.
- Attributes
Remarks
Set the data buffer for this packet. With the offset of this DatagramPacket set to 0, and the length set to the length of buf
.
Added in 1.1.
Java documentation for java.net.DatagramPacket.setData(byte[])
.
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
SetData(Byte[], Int32, Int32)
Set the data buffer for this packet.
[Android.Runtime.Register("setData", "([BII)V", "")]
public void SetData (byte[]? buf, int offset, int length);
[<Android.Runtime.Register("setData", "([BII)V", "")>]
member this.SetData : byte[] * int * int -> unit
Parameters
- buf
- Byte[]
the buffer to set for this packet
- offset
- Int32
the offset into the data
- length
- Int32
the length of the data and/or the length of the buffer used to receive data
- Attributes
Remarks
Set the data buffer for this packet. This sets the data, length and offset of the packet.
Added in 1.2.
Java documentation for java.net.DatagramPacket.setData(byte[], int, 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.