Skip to content
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

关于mina长连接 #1

Closed
cyq7on opened this issue Jul 17, 2016 · 4 comments
Closed

关于mina长连接 #1

cyq7on opened this issue Jul 17, 2016 · 4 comments

Comments

@cyq7on
Copy link

cyq7on commented Jul 17, 2016

创建后台服务,在服务中创建MINA长连接;
实现长连接断了之后的重连机制,并且重连次数有限制不能一直重连;
您好,以上是您文中提到的两个流程,重连次数为什么有限制呢?如果没有限制,是否可以省略后台服务,单独依靠后者进行重连?

@yipianfengye
Copy link
Owner

重连接次数有限制的,大概是可以重连接10次,这里的重新连接通过代码重新连接,十次之后还有每个一分钟的闹钟服务检测长连接状态,若没有连接的话也会重新执行连接操作。
另外在长连接断开之后会启动一个轮训服务,当长连接恢复之后关闭轮训服务,这样可以保证消息的及时性。

@cyq7on
Copy link
Author

cyq7on commented Jul 18, 2016

好的,O(∩_∩)O谢谢

@cyq7on cyq7on closed this as completed Jul 18, 2016
@yipianfengye
Copy link
Owner

O(∩_∩)O哈哈~,共同学习

@ygbingo
Copy link

ygbingo commented Jul 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants