public interface TioServerListener extends TioListener
| Modifier and Type | Method and Description |
|---|---|
default boolean |
onHeartbeatTimeout(ChannelContext context,
long interval,
int heartbeatTimeoutCount)
服务器检查到心跳超时时,会调用这个函数(一般场景,该方法只需要直接返回false即可)
|
onAfterConnected, onAfterDecoded, onAfterHandled, onAfterReceivedBytes, onAfterSent, onBeforeClosedefault boolean onHeartbeatTimeout(ChannelContext context, long interval, int heartbeatTimeoutCount)
context - ChannelContextinterval - 已经多久没有收发消息了,单位:毫秒heartbeatTimeoutCount - 心跳超时次数,第一次超时此值是1,以此类推。此值被保存在:channelContext.stat.heartbeatTimeoutCountCopyright © 2024. All rights reserved.