Sintaxe
RakNet.remove_receive_hook(callback: function)Aliases
raknet.remove_receive_hookArgumentos
| Nome | Tipo | Descrição |
|---|---|---|
callback | function | The callback closure to remove from incoming packet hooks. |
Descrição
Removes a receive hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
Chame com 1 parametro(s): callback. A tabela de argumentos explica quais valores sao obrigatorios e quais refinam o comportamento.
Nao retorna dados. Trate a chamada como uma acao e lide com erros no ponto de chamada.
Exemplo
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