definePacket<Defined in: modules/network/src/shared/packet.ts:72 Declare a packet type.T>(name,options?):PacketDefinition<T>
Type Parameters
T
T = void
Parameters
name
string
Name identifying the type on the wire, unique in the game.
options?
PacketOptions<T> = {}
Default channel and payload validate check.
Returns
PacketDefinition<T>
The packet definition, used by packets.on, read and send.