Skip to content
Network internalsOverview

raknet.remove_receive_hook

Represents removal of an incoming-packet callback.

Aliasesraknet.removereceivehookremove_receive_hook

Details#

Removes one matching incoming callback in the current context. Use the original function value, not a newly created equivalent function. Returns true if removed, false if absent.

Examples#

Example

Luau
local callback = raknet.add_receive_hook(function(packet) end)
print(raknet.remove_receive_hook(callback)) -- true