AcediaDocumentation

raknet.add_send_hook

Registers a callback for send 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_send_hook(callback: (RakNetPacket) -> (), packetIds: {number}?): ()

Parameters

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

Aliases: raknet.addsendhook, transport.add_send_hook.

On this page