RakNet

RakNet.remove_send_hook

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

Sintaxe

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

Argumentos

NomeTipoDescrição
callbackfunctionThe callback closure to remove from outgoing packet hooks.

Descrição

Removes a send 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 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