raknet.removesendhook
Removes a registered outgoing packet callback.
Syntax
raknet.removesendhook(callback: function) -> boolean
Also available as
raknet.remove_send_hook
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | function | Previously registered callback. |
Returns
| Type | Description |
|---|---|
boolean | True if a matching registration was removed, false otherwise. |
Description
Pass the exact function object used at registration; a newly created function with the same body is not the same callback. When a callback has been registered more than once, removal removes one matching registration.
Example
local function inspect(packet) print(packet.Size) end
raknet.addsendhook(inspect)
print(raknet.removesendhook(inspect))
These are Game executor contracts. Check build requirements and session lifetimes before using them.
