Meta XR Platform SDK (UPM) v71 Reference Guide
Meta XR Platform SDK (UPM) v71 Reference Guide
Select your platform
No SDKs available
No versions available

Packet Class

Extends IDisposable
This class provides a way to encapsulate and transmit data across a network. It contains methods for reading and writing data, as well as properties for accessing metadata about the packet. See more info about Platform Solutions here.

Properties

Gets the sender ID of the packet. This value identifies the source of the packet and can be used to track the origin of the data.
Gets the size of the packet in bytes. This value represents the total amount of data contained within the packet.

Member Functions

Initializes a new instance of the Packet class with a specified packet handle. The param packetHandle must be a valid handle to a packet created by the underlying native API.
Copies all the bytes in the payload into a byte array. This method is used to retrieve the raw data contained within the packet.
Parameters
destination
The destination byte array. This array must be large enough to hold the entire packet payload, which is specified by the Size property.
Returns
The number of bytes read from the packet. This value will always be equal to the Size property.
This method is called when the Packet is being garbage collected or when it is explicitly disposed of. It is responsible for releasing any unmanaged resources, such as the native packet handle, that are held by the Packet.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon