RakNet

RakNet.remove_send_hook

Removes a send hook previously registered with the same callback closure.

Syntaxe

RakNet.remove_send_hook(callback: function)
Alias raknet.remove_send_hook

Arguments

NomTypeDescription
callbackfunctionThe 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.

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 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