Skip to main content
PacketOptions<T> = object
Defined in: modules/network/src/shared/packet.ts:20 Options of definePacket.

Type Parameters

T

T Payload type of the packet.

Properties

channel?

optional channel?: Channel
Defined in: modules/network/src/shared/packet.ts:26 Channel the packet is sent on when send gets no channel option.

Default Value

Channel.ReliableOrdered

validate?

optional validate?: (data) => data is T
Defined in: modules/network/src/shared/packet.ts:31 Check a received payload before it reaches listeners or read. Packets that fail it, or make it throw, are dropped with a warning.

Parameters

data
unknown

Returns

data is T