-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
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
关于主动关闭socket连接的想法 #166
Comments
服务端用session.close()就可以了 |
关于异常中断重连请教2个问题:
谢谢! |
这个有方案么 , 目前服务端调用close() 客户端收到的code为1006, 想要区分这块的code. 谢谢 |
客户端自己调用close自己知道,不需要判断code。 |
相关问题: 请问可以在OnClose里获取close状态码吗 这份code代码应该是websocket的规范定义, 从导入的依赖中能找到一个类也同样记录了这个code: javax.websocket.CloseReason 目前引入本仓库框架, 业务逻辑处理后, 主动调用session.close() 方法, 但该方法没有办法去指定code。 ps: 客户端的包: 期望: 因为服务端已经做了相应的逻辑处理。期望给客户端返回的code 为1000 正常断开,如果1006 将会触发重连逻辑。 |
目前没支持code,会纳入下个版本 |
这个其实可以用 |
谢谢建议 |
@onclose 是监听关闭事件的,,, 我们能否在 服务端 实现主动关闭连接, 而client端的 ws.close 方法是客户端的主动关闭。
The text was updated successfully, but these errors were encountered: