raknet. remove_receive_hook Synchronous
RakNet.remove_receive_hookRakNet.removereceivehookraknet.removereceivehook
Unregister a callback previously added with raknet.add_receive_hook. Use this when an inspection window or packet modification is finished.
Luau
raknet.remove_receive_hook(callback: Function) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Function | The exact callback function that was registered. |
Returns
()No value.
Usage notes
Signal connections created with OnPacketReceive:Connect 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 onReceive(packet) print(packet.ID) end
raknet.add_receive_hook(onReceive)
raknet.remove_receive_hook(onReceive)
end