الصيغة
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 parameter: callback. يوضح جدول arguments القيم المطلوبة والقيم التي تضبط السلوك.
لا يعيد بيانات. تعامل مع الاستدعاء كإجراء وتعامل مع الأخطاء حول موضع الاستدعاء عند الحاجة.
مثال
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