Pretty much the same thing as
RemoteEvent’s and RemoteFunction’s - they do the same job, but in RakNet you work with the raw packets instead of simple remotes.
Your hook receives one RakNetMessage for the packet. From inside the hook you can read its payload, replace it with RakNetMessage:SetData, or stop the packet with RakNetMessage:Block. The hook runs on outgoing packets only. Several hooks can be registered at once and every one of them runs per packet.
Parameters
Returns
void
raknet.add_send_hook returns nothing. Your hook decides the packet’s fate by its return value:
return false- the packet is dropped and never sent.return nil, or nothing - the packet passes through unchanged.