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.session.NetworkSession
org.geysermc.mcprotocollib.network.session.ClientNetworkSession
org.geysermc.geyser.network.netty.LocalSession
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,org.geysermc.mcprotocollib.network.ClientSession,org.geysermc.mcprotocollib.network.Session
public final class LocalSession
extends org.geysermc.mcprotocollib.network.session.ClientNetworkSession
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.session.ClientNetworkSession
bindAddress, proxyFields inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession
disconnected, packetHandlerExecutor, protocol, remoteAddress -
Constructor Summary
ConstructorsConstructorDescriptionLocalSession(SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.protocol.MinecraftProtocol protocol, Executor packetHandlerExecutor) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidShould only be called when direct ByteBufs should be preferred.protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> protected io.netty.channel.ChannelHandlerprotected io.netty.channel.EventLoopGroupprotected voidsetOptions(io.netty.bootstrap.Bootstrap bootstrap) Methods inherited from class org.geysermc.mcprotocollib.network.session.ClientNetworkSession
connect, getProxy, newThreadFactoryMethods inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession
addListener, callEvent, callPacketReceived, callPacketSent, channelActive, channelInactive, channelRead0, disconnect, exceptionCaught, getChannel, getFlags, getFlagSupplied, getGenericDisconnectMessage, getListeners, getLocalAddress, getPacketHandlerExecutor, getPacketProtocol, 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.ClientSession
connectMethods inherited from interface org.geysermc.mcprotocollib.network.Session
addListener, callEvent, callPacketReceived, callPacketSent, disconnect, disconnect, disconnect, disconnect, getChannel, getFlag, getFlag, getFlags, getFlagSupplied, getListeners, getLocalAddress, getPacketHandlerExecutor, getPacketProtocol, getRemoteAddress, hasFlag, isConnected, removeListener, send, send, setAutoRead, setCompression, setEncryption, setFlag, setFlags, switchInboundState, switchOutboundState
-
Constructor Details
-
LocalSession
public LocalSession(SocketAddress targetAddress, String clientIp, org.geysermc.mcprotocollib.protocol.MinecraftProtocol protocol, Executor packetHandlerExecutor)
-
-
Method Details
-
getChannelFactory
protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getChannelFactory()- Overrides:
getChannelFactoryin classorg.geysermc.mcprotocollib.network.session.ClientNetworkSession
-
setOptions
protected void setOptions(io.netty.bootstrap.Bootstrap bootstrap) - Overrides:
setOptionsin classorg.geysermc.mcprotocollib.network.session.ClientNetworkSession
-
getEventLoopGroup
protected io.netty.channel.EventLoopGroup getEventLoopGroup()- Overrides:
getEventLoopGroupin classorg.geysermc.mcprotocollib.network.session.ClientNetworkSession
-
getChannelHandler
protected io.netty.channel.ChannelHandler getChannelHandler()- Overrides:
getChannelHandlerin classorg.geysermc.mcprotocollib.network.session.ClientNetworkSession
-
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.
-