Class LocalSession

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<com.github.steveice10.packetlib.packet.Packet>
com.github.steveice10.packetlib.tcp.TcpSession
org.geysermc.geyser.network.netty.LocalSession
All Implemented Interfaces:
com.github.steveice10.packetlib.Session, io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public final class LocalSession extends com.github.steveice10.packetlib.tcp.TcpSession
Manages a Minecraft Java session over our LocalChannel implementations.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields inherited from class com.github.steveice10.packetlib.tcp.TcpSession

    disconnected, host, port, USE_EVENT_LOOP_FOR_PACKETS
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalSession​(String host, int port, SocketAddress targetAddress, String clientIp, com.github.steveice10.packetlib.packet.PacketProtocol protocol)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static void
    Should only be called when direct ByteBufs should be preferred.

    Methods inherited from class com.github.steveice10.packetlib.tcp.TcpSession

    addListener, callEvent, callPacketReceived, callPacketSent, channelActive, channelInactive, channelRead0, connect, disconnect, disconnect, enableEncryption, exceptionCaught, getChannel, getCompressionThreshold, getConnectTimeout, getFlag, getFlag, getFlags, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getReadTimeout, getRemoteAddress, getWriteTimeout, hasFlag, isConnected, refreshReadTimeoutHandler, refreshReadTimeoutHandler, refreshWriteTimeoutHandler, refreshWriteTimeoutHandler, removeListener, send, setCompressionThreshold, setConnectTimeout, setFlag, setReadTimeout, setWriteTimeout

    Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

    acceptInboundMessage, channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • LocalSession

      public LocalSession(String host, int port, SocketAddress targetAddress, String clientIp, com.github.steveice10.packetlib.packet.PacketProtocol protocol)
  • Method Details

    • connect

      public void connect()
      Specified by:
      connect in interface com.github.steveice10.packetlib.Session
      Overrides:
      connect in class com.github.steveice10.packetlib.tcp.TcpSession
    • createDirectByteBufAllocator

      public static void createDirectByteBufAllocator()
      Should only be called when direct ByteBufs should be preferred. At this moment, this should only be called on BungeeCord.