Syntax
RakNet.remove_send_hook(callback: function)Aliases
raknet.remove_send_hookArguments
| Name | Type | Description |
|---|---|---|
callback | function | The callback closure to remove from outgoing packet hooks. |
Description
Removes a send hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
Call it with 1 parameter(s): callback. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Remove a send hook by passing the same callback closure that was registered.
local function onSend(packet)
print(packet.Size)
end
if raknet.is_enabled then
raknet.add_send_hook(onSend)
raknet.remove_send_hook(onSend)
end