Class ClientNetworkSession
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
org.geysermc.mcprotocollib.network.session.NetworkSession
org.geysermc.mcprotocollib.network.session.ClientNetworkSession
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,ClientSession,Session
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsFields inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession
disconnected, packetHandlerExecutor, protocol, remoteAddress -
Constructor Summary
ConstructorsConstructorDescriptionClientNetworkSession(@NonNull SocketAddress remoteAddress, @NonNull PacketProtocol protocol, @NonNull Executor packetHandlerExecutor, @Nullable SocketAddress bindAddress, @Nullable ProxyInfo proxy) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(boolean wait) Connects this session to its host and port.protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel>protected io.netty.channel.ChannelHandlerprotected io.netty.channel.EventLoopGroup@Nullable ProxyInfogetProxy()Get the proxy used by this session.protected static ThreadFactoryprotected voidsetOptions(io.netty.bootstrap.Bootstrap bootstrap) Methods inherited from class org.geysermc.mcprotocollib.network.session.NetworkSession
addListener, callEvent, callPacketReceived, callPacketSent, channelActive, channelInactive, channelRead0, disconnect, exceptionCaught, getChannel, getFlags, getFlagSupplied, 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
-
Field Details
-
bindAddress
-
proxy
-
-
Constructor Details
-
ClientNetworkSession
public ClientNetworkSession(@NonNull SocketAddress remoteAddress, @NonNull PacketProtocol protocol, @NonNull Executor packetHandlerExecutor, @Nullable SocketAddress bindAddress, @Nullable ProxyInfo proxy)
-
-
Method Details
-
connect
public void connect(boolean wait) Description copied from interface:ClientSessionConnects this session to its host and port.- Specified by:
connectin interfaceClientSession- Parameters:
wait- Whether to wait for the connection to be established before returning.
-
getProxy
Description copied from interface:ClientSessionGet the proxy used by this session.- Specified by:
getProxyin interfaceClientSession- Returns:
- The proxy used by this session.
-
getEventLoopGroup
protected io.netty.channel.EventLoopGroup getEventLoopGroup() -
getChannelFactory
protected io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getChannelFactory() -
setOptions
protected void setOptions(io.netty.bootstrap.Bootstrap bootstrap) -
getChannelHandler
protected io.netty.channel.ChannelHandler getChannelHandler() -
newThreadFactory
-