RakNet

RakNet.remove_send_hook

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

Синтаксис

RakNet.remove_send_hook(callback: function)
Алиасы raknet.remove_send_hook

Аргументы

ИмяТипОписание
callbackfunctionThe callback closure to remove from outgoing packet hooks.

Описание

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

Вызывай с 1 параметрами: callback. Таблица аргументов показывает обязательные значения и настройки поведения.

Не возвращает данные. Рассматривай вызов как действие и обрабатывай ошибки рядом с местом вызова.

Пример

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