문법
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