Skip to main content
Connects a callback to the OnPacketSend signal table and returns a RakNetSignalConnection. The callback receives a RakNetPacket while the packet is valid.

Syntax

Aliases

  • raknet.OnPacketSend.Connect

Arguments

Returns

Types

RakNetPacket

Live packet object passed to RakNet hooks and packet signal callbacks. It is only valid during the callback that receives it.

RakNetSignalConnection

Connection object returned by RakNet.OnPacketSend.Connect and RakNet.OnPacketReceive.Connect.

Example

Use the signal-style API to observe outgoing packets and disconnect the returned connection.