语法
RakNet.remove_send_hook(callback: function)别名
raknet.remove_send_hook参数
| 名称 | 类型 | 描述 |
|---|---|---|
callback | function | The 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