-
Notifications
You must be signed in to change notification settings - Fork 254
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
能否收到客户端被动断线事件? #220
Comments
这个是客户端断开连接, 服务端收到的客户端连接断开的事件. |
如果我要做实时响应,有什么办法吗 |
推送消息, 客户端给ack, 连续的ack没有回来就认为连接有问题, 就断开连接? |
没错,我这里服务器会主动给客户端推消息,所以我需要知道客户端是否存活 |
客户端收到响应给回包啊, 服务端一段时间没收到回包, 就认为客户端断线了 |
我描述一下我的场景,客户端发TCP到服务器建立连接,服务器定期以oneway的方式给客户端推送消息,如果客户端主动断开TCP,服务器能收到事件,如果客户端宕机,服务器能收到什么事件吗?TCP已经超时了,但我这里测试业务层并没有生成超时事件,是否因为服务器一直推送导致没有超时? |
客户端宕机了, 是程序挂了, 还是服务器挂了? 如果服务器挂了, 是有可能就没这个事件, 只有等到60秒以后(配置的), 服务端会主动断开连接, 有一个onClose回调 |
机器挂了,因为我的服务器在客户端没发请求的时候也会给客户端发包,所以并不会导致这个60秒超时 |
Servant内这个函数是客户端主动断线调用的,如果客户端宕机,服务器给客户端推送消息,能否收到RST信号的事件?
The text was updated successfully, but these errors were encountered: