Syntax
RakNet.remove_send_hook(callback: function)Aliase
raknet.remove_send_hookArgumente
| Name | Typ | Beschreibung |
|---|---|---|
callback | function | The callback closure to remove from outgoing packet hooks. |
Beschreibung
Removes a send hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
Rufe es mit 1 Parameter(n) auf: callback. Die Argumenttabelle erklärt, welche Werte erforderlich sind und welche nur das Verhalten verfeinern.
Es gibt keine Daten zurück. Behandle den Aufruf als Aktion und fange Fehler an der Aufrufstelle ab.
Beispiel
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