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

public class TcpClientSession extends TcpSession
  • Constructor Details

  • Method Details

    • buildChannelInitializer

      public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> buildChannelInitializer(boolean transferring)
    • buildBootstrap

      public io.netty.bootstrap.Bootstrap buildBootstrap(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> initializer)
    • connect

      public void connect(boolean wait, boolean transferring)
      Description copied from interface: Session
      Connects this session to its host and port.
      Specified by:
      connect in interface Session
      Overrides:
      connect in class TcpSession
      Parameters:
      wait - Whether to wait for the connection to be established before returning.
      transferring - Whether the session is a client being transferred.
    • connect

      public void connect(boolean wait, boolean transferring, io.netty.bootstrap.Bootstrap bootstrap)
    • getCodecHelper

      public PacketCodecHelper getCodecHelper()
      Description copied from interface: Session
      Gets the session's PacketCodecHelper.
      Returns:
      The session's packet codec helper.
    • disconnect

      public void disconnect(String reason, Throwable cause)
      Description copied from interface: Session
      Disconnects the session.
      Specified by:
      disconnect in interface Session
      Overrides:
      disconnect in class TcpSession
      Parameters:
      reason - Reason for disconnecting.
      cause - Throwable responsible for disconnecting.
    • getBindAddress

      public String getBindAddress()
    • getBindPort

      public int getBindPort()
    • getProxy

      public ProxyInfo getProxy()
    • getTcpManager

      public TcpConnectionManager getTcpManager()