NoOpMessageEncoder

A no-operation implementation of a message encoder. This will not modify the buffer in any way.

Properties

Link copied to clipboard

A boolean indicating whether this packet has a fully encrypted payload.

Link copied to clipboard
abstract val prot: ServerProt

The protocol type of this message, providing us with the expected size of the message.

Functions

Link copied to clipboard
open override fun encode(streamCipher: StreamCipher, buffer: JagByteBuf, message: T)

Encodes the message into the buffer where the buffer is the out property in Netty. Rather than allocating new byte buf instances, we can directly encode to the out property with most packets. This does not however hold true with pre-computed ones, such as player info, where we must instead write the pre-computed bytes over to out first.