ReferenceRakNet

raknet.receive

Hands a packet to the receive hooks as if it had arrived.

Syntax

raknet.receive(data: string) -> ()

Parameters

ParameterTypeDescription
datastringPacket bytes, 1 to 8192.

Returns

TypeDescription
()Nothing.

Description

The bytes are shown to receive hooks only. They are never given to the game's own packet handling, so the game does not see them. Receive hooks observe snapshots and cannot block or replace traffic.

Example

raknet.addreceivehook(function(packet)
    print(packet.Size)
end)
raknet.receive("\255example")

These are Game executor contracts. Check build requirements and session lifetimes before using them.