We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
比如他5分钟不发消息,就认为他已经掉线了,就关闭链接,这个onclose方法是否可以设置客户端5分钟没法消息,服务器自动触发onclose方法,有没有配置啊
The text was updated successfully, but these errors were encountered:
可以配置allIdleTimeSeconds 属性,然后在 OnEvent 事件里面就有回调
allIdleTimeSeconds
OnEvent
Sorry, something went wrong.
虽然作者回复了,但我这边也可以完善一下回答:如果要做5分钟没发消息就离线,readerIdleTimeSeconds设置为5分钟,然后onEvent,然后判断idleStateEvent.state()为READER_IDLE就关闭Session,就会自动触发onclose
No branches or pull requests
比如他5分钟不发消息,就认为他已经掉线了,就关闭链接,这个onclose方法是否可以设置客户端5分钟没法消息,服务器自动触发onclose方法,有没有配置啊
The text was updated successfully, but these errors were encountered: