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()
    • buildBootstrap

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

      public void connect(boolean wait)
      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.
    • connect

      public void connect(boolean wait, 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. This method just wraps the reason into a Component. It is recommended to use Components instead as they provide more flexibility.
      Parameters:
      reason - Reason for disconnecting.
      cause - Throwable responsible for disconnecting.
      See Also:
    • getBindAddress

      public String getBindAddress()
    • getBindPort

      public int getBindPort()
    • getProxy

      public ProxyInfo getProxy()
    • getTcpManager

      public TcpConnectionManager getTcpManager()