Class AutoReadFlowControlHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.flow.FlowControlHandler
org.geysermc.mcprotocollib.network.netty.AutoReadFlowControlHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
public class AutoReadFlowControlHandler
extends io.netty.handler.flow.FlowControlHandler
A flow control handler for TCP connections.
When auto-read is disabled, this will halt decoding of packets until auto-read is re-enabled.
This is needed because auto-read still allows packets to be decoded, even if the channel is not reading anymore from the network.
This can happen when the channel already read a packet, but the packet is not yet decoded.
This will halt all decoding until the channel is ready to process more packets.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.netty.handler.flow.FlowControlHandler
channelInactive, channelRead, channelReadComplete, handlerAdded, handlerRemovedMethods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, writeMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
AutoReadFlowControlHandler
public AutoReadFlowControlHandler()
-
-
Method Details
-
read
- Specified by:
readin interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
readin classio.netty.handler.flow.FlowControlHandler- Throws:
Exception
-