Składnia
RakNet.remove_receive_hook(callback: function)Aliasy
raknet.remove_receive_hookArgumenty
| Nazwa | Typ | Opis |
|---|---|---|
callback | function | The callback closure to remove from incoming packet hooks. |
Opis
Removes a receive 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 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