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
client长时间不发送数据,再次发送数据时session.sendText()无效,重新关闭再打开时可用
The text was updated successfully, but these errors were encountered:
需要知道client长时间不发消息,连接是否被client主动断开了.
tips:每条连接对应着唯一一个session对象,也就是只要是同一条连接,在不同事件中的session都会是同一个对象.那么在连接断开时,@onclose事件也会把这个对象传进来,就可以进行连接断开的判断.另外,如果想要主动判断连接是否断开,可以使用session.isActive()
Sorry, something went wrong.
你可以写个心跳去维持连接 或者C端端每隔一段时间就往S端发送消息 就可以维持连接了
No branches or pull requests
client长时间不发送数据,再次发送数据时session.sendText()无效,重新关闭再打开时可用
The text was updated successfully, but these errors were encountered: