Class LocalSession

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

public final class LocalSession extends org.geysermc.mcprotocollib.network.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 org.geysermc.mcprotocollib.network.tcp.TcpSession

    disconnected, host, port
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalSession(String host, int port, SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.network.packet.PacketProtocol protocol, Executor packetHandlerExecutor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    connect(boolean wait, boolean transferring)
     
    static void
    Should only be called when direct ByteBufs should be preferred.
    org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper
     

    Methods inherited from class org.geysermc.mcprotocollib.network.tcp.TcpSession

    addListener, callEvent, callPacketReceived, callPacketSent, channelActive, channelInactive, channelRead0, connect, connect, disconnect, exceptionCaught, getChannel, getFlag, getFlag, getFlags, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getRemoteAddress, hasFlag, isConnected, removeListener, send, setAutoRead, setCompression, setEncryption, setFlag, setFlags

    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

    Methods inherited from interface org.geysermc.mcprotocollib.network.Session

    disconnect, disconnect, disconnect, send, switchInboundState, switchOutboundState
  • Constructor Details

    • LocalSession

      public LocalSession(String host, int port, SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.network.packet.PacketProtocol protocol, Executor packetHandlerExecutor)
  • Method Details

    • connect

      public void connect(boolean wait, boolean transferring)
      Specified by:
      connect in interface org.geysermc.mcprotocollib.network.Session
      Overrides:
      connect in class org.geysermc.mcprotocollib.network.tcp.TcpSession
    • getCodecHelper

      public org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper getCodecHelper()
    • 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.