RakNet

RakNet.remove_send_hook

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

Składnia

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

Argumenty

NazwaTypOpis
callbackfunctionThe callback closure to remove from outgoing packet hooks.

Opis

Removes a send hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.

Wywolaj z 1 parametrami: callback. Tabela argumentow wyjasnia wartosci wymagane i te, ktore doprecyzowuja zachowanie.

Nie zwraca danych. Traktuj wywolanie jako akcje i obsluguj bledy przy miejscu wywolania.

Przykład

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