Class DefaultSocketIdleHook
java.lang.Object
com.iohao.net.external.core.netty.hook.DefaultSocketIdleHook
- All Implemented Interfaces:
IdleHook<io.netty.handler.timeout.IdleStateEvent>, SocketIdleHook
TCP/WebSocket heartbeat hook
- Author:
- 渔民小镇
- date:
- 2023-02-18
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancallback(UserSession userSession, io.netty.handler.timeout.IdleStateEvent event) Heartbeat event callback.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IdleHook
pongBefore
-
Constructor Details
-
DefaultSocketIdleHook
public DefaultSocketIdleHook()
-
-
Method Details
-
callback
Description copied from interface:IdleHookHeartbeat event callback.You only need to handle your business logic here, such as notifying other players in the room that the user has gone offline.
-