PacketOptions<Defined in: modules/network/src/shared/packet.ts:20 Options ofT> =object
definePacket.
Type Parameters
T
T
Payload type of the packet.
Properties
channel?
Defined in: modules/network/src/shared/packet.ts:26 Channel the packet is sent on whenoptionalchannel?:Channel
send gets no channel option.
Default Value
Channel.ReliableOrdered
validate?
Defined in: modules/network/src/shared/packet.ts:31 Check a received payload before it reaches listeners oroptionalvalidate?: (data) =>data is T
read. Packets
that fail it, or make it throw, are dropped with a warning.
Parameters
data
unknown
Returns
data is T