Class TcpClientSession
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
org.geysermc.mcprotocollib.network.tcp.TcpSession
org.geysermc.mcprotocollib.network.tcp.TcpClientSession
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,Session
-
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, USE_EVENT_LOOP_FOR_PACKETS -
Constructor Summary
ConstructorsConstructorDescriptionTcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol) TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol, ProxyInfo proxy) TcpClientSession(String host, int port, PacketProtocol protocol) TcpClientSession(String host, int port, PacketProtocol protocol, ProxyInfo proxy) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(boolean wait, boolean transferring) Connects this session to its host and port.Gets the session'sPacketCodecHelper.protected static ThreadFactoryMethods 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
-
TcpClientSession
-
TcpClientSession
-
TcpClientSession
public TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol) -
TcpClientSession
public TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol, ProxyInfo proxy)
-
-
Method Details
-
connect
public void connect(boolean wait, boolean transferring) Description copied from interface:SessionConnects this session to its host and port.- Specified by:
connectin interfaceSession- Overrides:
connectin classTcpSession- Parameters:
wait- Whether to wait for the connection to be established before returning.transferring- Whether the session is a client being transferred.
-
getCodecHelper
Description copied from interface:SessionGets the session'sPacketCodecHelper.- Returns:
- The session's packet codec helper.
-
newThreadFactory
-