Method SetHeaderAndPacket
SetHeaderAndPacket(byte*, int, PacketHeader, InboundSendBuffer, long)
Write packet, packet header and tracking information to the given buffer space. This buffer should contain the reliability Context at the front, that contains the capacity of the buffer and pointer offsets needed to find the slots we can copy the packet to.
Declaration
[Obsolete("Internal API that shouldn't be used. Will be removed in Unity Transport 2.0.")]
public static void SetHeaderAndPacket(byte* self, int sequence, ReliableUtility.PacketHeader header, InboundSendBuffer data, long timestamp)
Parameters
Type | Name | Description |
---|---|---|
byte* | self | Buffer space where we can store packets. |
int | sequence | The sequence ID of the packet, this is used to find a slot inside the buffer. |
ReliableUtility.PacketHeader | header | The packet header which we'll store with the packet payload. |
InboundSendBuffer | data | The packet data which we're storing. |
long | timestamp |