network.remove_send_hook
Removes an outgoing packet hook.
Syntax
Signature
network.remove_send_hook(Hook: number | function) -> booleanAliases
raknet.remove_send_hookpackets.remove_send_hookRakNet.remove_send_hooknetwork.removesendhookraknet.removesendhookpackets.removesendhookRakNet.removesendhook
Parameters
| Parameter | Type | Description |
|---|---|---|
Hook | number | function | ID returned by registration, or the registered callback. |
Returns
| Type | Description |
|---|---|
boolean | Whether at least one hook was removed. |
Notes
Removes outgoing hooks matching a hook ID or the exact callback function. Passing a callback removes every matching hook in that direction.
Example
Luau
local Hook = network.add_send_hook(function(Packet)
print(Packet.type)
end)
print(network.remove_send_hook(Hook))