Syntaxe
RakNet.remove_receive_hook(callback: function)Alias
raknet.remove_receive_hookArguments
| Nom | Type | Description |
|---|---|---|
callback | function | The callback closure to remove from incoming packet hooks. |
Description
Removes a receive hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
Appelle le avec 1 parametre(s): callback. La table des arguments indique les valeurs requises et celles qui affinent le comportement.
Il ne renvoie pas de donnees. Traite l appel comme une action et gere les erreurs autour du point d appel.
Exemple
Remove a receive hook by passing the same callback closure that was registered.
local function onReceive(packet)
print(packet.Size)
end
if raknet.is_enabled then
raknet.add_receive_hook(onReceive)
raknet.remove_receive_hook(onReceive)
end