ไวยากรณ์
RakNet.remove_send_hook(callback: function)Aliases
raknet.remove_send_hookArguments
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
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.
เรียกด้วย parameter 1 ค่า: callback ตาราง arguments อธิบายค่าที่จำเป็นและค่าที่ปรับพฤติกรรม
ไม่ส่งคืนข้อมูล ให้มอง call นี้เป็น action และจัดการ error รอบจุดที่เรียกเมื่อจำเป็น
ตัวอย่าง
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