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

关于Communicator中几种状态的疑惑 #1019

Closed
Oldvv opened this issue Aug 16, 2022 · 3 comments
Closed

关于Communicator中几种状态的疑惑 #1019

Oldvv opened this issue Aug 16, 2022 · 3 comments

Comments

@Oldvv
Copy link

Oldvv commented Aug 16, 2022

您好!最近在学习workflow,膜拜ing。。。
有一点疑惑想请教。
Communicator::create_message只处理IDLE、KEEPALIVE、CONNECTED三个状态。 是否可能出现在SUCCESS状态(Communicator层还未处理res,状态还没变IDLE)的时候收到了新的消息的情况?

@Oldvv
Copy link
Author

Oldvv commented Aug 16, 2022

现在看来,如果出现这种情况,会移除关注fd。 还是说不会出现这种情况?

@Barenboim
Copy link
Contributor

Barenboim commented Aug 16, 2022

是的,同学,你看得非常仔细。主版的实现,消息是严格一来一回的,所以SUCCESS状态还未处理如果收到数据,就认为肯定是垃圾数据,直接关连接,但之前成功的消息还是会返回给用户。
全双工的版本,可以看看这个用户的实现:
#873

@Oldvv
Copy link
Author

Oldvv commented Aug 16, 2022

好的. 感谢解惑~

@Oldvv Oldvv closed this as completed Aug 16, 2022
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

2 participants