構文
RakNet.remove_receive_hook(callback: function)エイリアス
raknet.remove_receive_hook引数
| 名前 | 型 | 説明 |
|---|---|---|
callback | function | The callback closure to remove from incoming packet hooks. |
説明
Removes a receive 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 receive hook by passing the same callback closure that was registered.
local function onReceive(packet)
print(packet.Size)
end
if raknet.is_enabled then
raknet.add_receive_hook(onReceive)
raknet.remove_receive_hook(onReceive)
end