PlayerAvatarExtendedInfo

constructor(localIndex: Int, filter: ExtendedInfoFilter, extendedInfoWriters: List<PlayerAvatarExtendedInfoWriter>, allocator: ByteBufAllocator, huffmanCodec: HuffmanCodecProvider)

Parameters

localIndex

the index of the avatar who owns this extended info block.

filter

the filter responsible for ensuring the total packet size constraint is not broken in any way. If this filter does not conform to the contract correctly, crashes are likely to happen during encoding.

extendedInfoWriters

the list of client-specific writers & encoders of all extended info blocks. During caching procedure, all registered client buffers will be built concurrently among players.

allocator

the byte buffer allocator used to allocate buffers during the caching procedure. Any extended info block which is built on-demand is written directly into the main buffer.

huffmanCodec

the Huffman codec is used to compress public chat extended info blocks.