@ChannelHandler.Sharable public class BedrockBatchDecoder extends io.netty.handler.codec.MessageToMessageDecoder<BedrockBatchWrapper>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_PACKETS
Default limit for batches read from clients, set by
bedrock.maxPacketsPerBatch. |
static int |
DEFAULT_MAX_SERVER_PACKETS
Default limit for batches read from servers, set by
bedrock.maxPacketsPerServerBatch. |
static java.lang.String |
NAME |
| Constructor and Description |
|---|
BedrockBatchDecoder() |
BedrockBatchDecoder(int maxPackets) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
BedrockBatchWrapper msg,
java.util.List<java.lang.Object> out) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic static final java.lang.String NAME
public static final int DEFAULT_MAX_PACKETS
bedrock.maxPacketsPerBatch.public static final int DEFAULT_MAX_SERVER_PACKETS
bedrock.maxPacketsPerServerBatch. Servers batch far
more packets than clients.public BedrockBatchDecoder()
public BedrockBatchDecoder(int maxPackets)
maxPackets - the most packets one batch may holdprotected void decode(io.netty.channel.ChannelHandlerContext ctx,
BedrockBatchWrapper msg,
java.util.List<java.lang.Object> out)
decode in class io.netty.handler.codec.MessageToMessageDecoder<BedrockBatchWrapper>