Skip to content
Network internalsOverview

raknet.remove_send_hook

Represents removal of an outgoing-packet callback.

Aliasesraknet.removesendhookremove_send_hook

Details#

Removes one matching outgoing callback registered in the current context. Pass the same function value returned by add_send_hook. Returns true when found, false otherwise.

Examples#

Example

Luau
local callback = raknet.add_send_hook(function(packet) end)
print(raknet.remove_send_hook(callback)) -- true
print(raknet.remove_send_hook(callback)) -- false