VINDICTA.TOP
RakNet · Class
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

RakNetPacket

Packet object passed to RakNet send hooks.

type RakNetPacket = { PacketId: number, Size: number, Priority: number, AsBuffer: buffer, AsArray: table, AsString: string, Reliability: number, OrderingChannel: number }

Usage

Inspect packet fields
raknet.add_send_hook(function(packet)
    print(packet.PacketId, packet.Size)
    print(packet.AsString)
end)

Fields

FieldTypeDescription
PacketIdnumberThe ID of the packet.
SizenumberThe size of the packet data.
PrioritynumberThe packet priority.
AsBufferbufferThe packet payload as a buffer.
AsArraytableThe packet payload as an array.
AsStringstringThe packet payload as a string.
ReliabilitynumberThe packet reliability mode.
OrderingChannelnumberThe ordering channel used for ordered traffic.

Methods

MethodReturnsDescription
SetData(data: buffer | table | string | {number})voidSets the packet payload.
Block()voidBlocks the packet from being sent.