Class ClientSession
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
com.zenith.network.client.ClientSession
- 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
FieldsModifier and TypeFieldDescriptionprotected longprotected longprotected longFields inherited from class org.geysermc.mcprotocollib.network.tcp.TcpSession
HA_PROXY_ENCODER_ID, host, ID, port, PROXY_HANDLER_ID, READ_TIMEOUT_HANDLER_ID, WRITE_TIMEOUT_HANDLER_ID -
Constructor Summary
ConstructorsConstructorDescriptionClientSession(String host, int port, String bindAddress, MinecraftProtocol protocol, ProxyInfo proxyInfo, TcpConnectionManager tcpManager) ClientSession(String host, int port, String bindAddress, MinecraftProtocol protocol, TcpConnectionManager tcpManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcallDisconnected(net.kyori.adventure.text.Component reason, Throwable cause) voidcallDisconnecting(net.kyori.adventure.text.Component reason, Throwable cause) booleancallPacketError(Throwable throwable) voidcallPacketReceived(Packet packet) callPacketSending(Packet packet) voidcallPacketSent(Packet packet) voidconnect(boolean wait) voiddisconnect(net.kyori.adventure.text.Component reason, Throwable cause) voidexecuteInEventLoop(Runnable runnable) com.viaversion.viaversion.api.protocol.version.ProtocolVersionvoidsetDisconnected(boolean disconnected) voidsetOnline(boolean online) Methods inherited from class org.geysermc.mcprotocollib.network.tcp.TcpClientSession
buildBootstrap, buildChannelInitializer, connect, connect, disconnect, getBindAddress, getBindPort, getProxy, getTcpManagerMethods inherited from class org.geysermc.mcprotocollib.network.tcp.TcpSession
addListener, channelActive, channelInactive, channelRead0, connect, enableEncryption, exceptionCaught, flush, getChannel, getCompressionThreshold, getConnectTimeout, getFlag, getFlag, getFlags, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getProtocol, getReadTimeout, getRemoteAddress, getWriteTimeout, hasFlag, isConnected, isDisconnected, refreshReadTimeoutHandler, refreshReadTimeoutHandler, refreshWriteTimeoutHandler, refreshWriteTimeoutHandler, removeListener, send, send, sendAsync, sendAwait, sendBundle, sendBundle, sendBundleDirect, sendBundleDirect, sendDelayedDirect, sendDirect, sendScheduledAsync, setAutoRead, setChannel, setCompressionThreshold, setCompressionThreshold, setConnectTimeout, setFlag, setFlags, setHost, setListeners, setPort, setReadTimeout, setWriteTimeoutMethods 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, switchInboundState, switchOutboundState
-
Field Details
-
ping
protected long ping -
lastPingId
protected long lastPingId -
lastPingSentTime
protected long lastPingSentTime
-
-
Constructor Details
-
ClientSession
public ClientSession(String host, int port, String bindAddress, MinecraftProtocol protocol, ProxyInfo proxyInfo, TcpConnectionManager tcpManager) -
ClientSession
public ClientSession(String host, int port, String bindAddress, MinecraftProtocol protocol, TcpConnectionManager tcpManager)
-
-
Method Details
-
setOnline
public void setOnline(boolean online) -
setDisconnected
public void setDisconnected(boolean disconnected) - Overrides:
setDisconnectedin classTcpSession
-
disconnect
- Specified by:
disconnectin interfaceSession- Overrides:
disconnectin classTcpSession
-
connect
public void connect(boolean wait) - Specified by:
connectin interfaceSession- Overrides:
connectin classTcpSession
-
callPacketReceived
- Specified by:
callPacketReceivedin interfaceSession- Overrides:
callPacketReceivedin classTcpSession
-
callPacketSending
- Specified by:
callPacketSendingin interfaceSession- Overrides:
callPacketSendingin classTcpSession
-
callPacketSent
- Specified by:
callPacketSentin interfaceSession- Overrides:
callPacketSentin classTcpSession
-
callPacketError
- Specified by:
callPacketErrorin interfaceSession- Overrides:
callPacketErrorin classTcpSession
-
callConnected
public void callConnected()- Specified by:
callConnectedin interfaceSession- Overrides:
callConnectedin classTcpSession
-
callDisconnecting
- Specified by:
callDisconnectingin interfaceSession- Overrides:
callDisconnectingin classTcpSession
-
callDisconnected
- Specified by:
callDisconnectedin interfaceSession- Overrides:
callDisconnectedin classTcpSession
-
getProtocolVersion
public com.viaversion.viaversion.api.protocol.version.ProtocolVersion getProtocolVersion() -
executeInEventLoop
-