public class TcpServerSession extends TcpSession
USE_EVENT_LOOP_FOR_PACKETS| Constructor and Description |
|---|
TcpServerSession(String host,
int port,
PacketProtocol protocol,
TcpServer server) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
PacketCodecHelper |
getCodecHelper()
Gets the session's
PacketCodecHelper. |
<T> T |
getFlag(String key,
T def)
Gets the value of the given flag as an instance of the given type.
|
Map<String,Object> |
getFlags()
Gets this session's set flags.
|
boolean |
hasFlag(String key)
Checks whether this session has a flag set.
|
addListener, callEvent, callPacketReceived, callPacketSent, connect, connect, disconnect, disconnect, disconnect, disconnect, enableEncryption, exceptionCaught, getChannel, getCompressionThreshold, getConnectTimeout, getFlag, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getReadTimeout, getRemoteAddress, getWriteTimeout, isConnected, removeListener, send, setCompressionThreshold, setConnectTimeout, setFlag, setReadTimeout, setWriteTimeoutacceptInboundMessage, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic TcpServerSession(String host, int port, PacketProtocol protocol, TcpServer server)
public PacketCodecHelper getCodecHelper()
SessionPacketCodecHelper.public Map<String,Object> getFlags()
SessiongetFlags in interface SessiongetFlags in class TcpSessionpublic boolean hasFlag(String key)
SessionhasFlag in interface SessionhasFlag in class TcpSessionkey - Key of the flag to check for.public <T> T getFlag(String key, T def)
SessiongetFlag in interface SessiongetFlag in class TcpSessionT - Type of the flag.key - Key of the flag.def - Default value of the flag.public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class TcpSessionExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class TcpSessionExceptionCopyright © 2023. All rights reserved.