Removes a hook added with add_send_hook. Pass the same function you added.
RakNet is off by default. The library exists only when the RakNet feature is enabled in the Athena loader, and it is published on getgenv() rather than as a plain global. Guard your code with if getgenv().raknet then ... end, or read raknet.is_enabled.

Parameters

function
required
The exact function that was added.

Behavior

  • Identity matters. It must be the same function value; an equivalent anonymous function will not match. Keep a reference when you add it.
  • The send filter is uninstalled once the last send hook is removed.

Example

Errors