raknet. remove_send_hook Synchronous
RakNet.remove_send_hookRakNet.removesendhookraknet.removesendhook
Unregister a callback previously added with raknet.add_send_hook. Keep the exact function reference you registered so cleanup can remove it later.
Luau
raknet.remove_send_hook(callback: Function) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Function | The registered callback function. |
Returns
()No value.
Usage notes
This removes matching legacy send-hook registrations. Signal connections use :Disconnect instead.
Availability
RakNet is disabled by default. RakNet and raknet are removed when the setting is off; retained references can still call is_enabled().
Example
Luau
if raknet.is_enabled() then
local function onSend(packet) print(packet.ID) end
raknet.add_send_hook(onSend)
raknet.remove_send_hook(onSend)
end