AcediaDocumentation

raknet.add_receive_hook

Registers a callback for receive packets.

Returns no ID or connection. Remove the hook using the same callback. Valid IDs in the optional array restrict the callback; if no valid filter IDs are recorded, the hook is unfiltered. Packet mutation methods are valid only during the callback.

raknet.add_receive_hook(callback: (RakNetPacket) -> (), packetIds: {number}?): ()

Parameters

ParameterTypeDescription
callback(RakNetPacket) -> ()Packet callback.
packetIds{number}?Optional list of packet IDs from 0 to 255.

Aliases: raknet.addreceivehook, transport.add_receive_hook.

On this page