RakNet

RakNet.remove_receive_hook

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

Söz dizimi

RakNet.remove_receive_hook(callback: function)
Aliaslar raknet.remove_receive_hook

Argümanlar

AdTipAçıklama
callbackfunctionThe callback closure to remove from incoming packet hooks.

Açıklama

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

1 parametre ile cagir: callback. Arguman tablosu hangi degerlerin zorunlu oldugunu ve hangilerinin davranisi incelttigini aciklar.

Veri dondurmez. Cagriyi bir aksiyon olarak ele al ve gerekiyorsa hatalari cagri noktasinda yakala.

Örnek

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