> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# RakNet.remove_receive_hook

> Removes a receive hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.

<div className="real-function-page">
  ```lua theme={null}
  RakNet.remove_receive_hook(callback: function)
  ```

  ## Alias

  * `raknet.remove_receive_hook`

  ## Arguments

  <ParamField path={"callback"} type={"function"} required>
    The callback closure to remove from incoming packet hooks.
  </ParamField>

  ## Exemple

  Remove a receive hook by passing the same callback closure that was registered.

  ```lua theme={null}
  local function onReceive(packet)
      print(packet.Size)
  end

  if raknet.is_enabled then
      raknet.add_receive_hook(onReceive)
      raknet.remove_receive_hook(onReceive)
  end
  ```
</div>
