Cú pháp
RakNet.remove_send_hook(callback: function)Alias
raknet.remove_send_hookĐối số
| Tên | Kiểu | Mô tả |
|---|---|---|
callback | function | The callback closure to remove from outgoing packet hooks. |
Mô tả
Removes a send hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
Goi voi 1 parameter: callback. Bang arguments giai thich gia tri nao bat buoc va gia tri nao chi tinh chinh hanh vi.
Khong tra ve du lieu. Xem call nhu mot action va xu ly loi quanh vi tri goi khi can.
Ví dụ
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