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