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
ConstructorsConstructorDescriptionLocalSession(String host, int port, SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.network.packet.PacketProtocol protocol, Executor packetHandlerExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(boolean wait, boolean transferring) static voidShould only be called when direct ByteBufs should be preferred.org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelperMethods 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, setFlagsMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemovedMethods 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:
connectin interfaceorg.geysermc.mcprotocollib.network.Session- Overrides:
connectin classorg.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.
-