Class TcpFlowControlHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.flow.FlowControlHandler
org.geysermc.mcprotocollib.network.tcp.TcpFlowControlHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

public class TcpFlowControlHandler 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    read(io.netty.channel.ChannelHandlerContext ctx)
     

    Methods inherited from class io.netty.handler.flow.FlowControlHandler

    channelInactive, channelRead, channelReadComplete, handlerAdded, handlerRemoved

    Methods inherited from class io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, flush, write

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TcpFlowControlHandler

      public TcpFlowControlHandler()
  • Method Details

    • read

      public void read(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      read in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      read in class io.netty.handler.flow.FlowControlHandler
      Throws:
      Exception