-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
修复ikcp_check返回current, ikcp_upate可能不会调ikcp_flush #48
base: master
Are you sure you want to change the base?
Conversation
check 的目的应该是减少 update 的调用而不是替代. check 返回的时间可以用于自己的定时器来调度 update 调用的时机. 这样改似乎和本意不符啊. |
是这么回事情,check就是check,这次update没有触发到flush,check会返回个很短的时间回来,下次就能触发。再你实在想每次check到就flush,你可以调用完update后,手动调用一次flush啊。 |
我理解,如果check到resents超时,这时候有片需要重发,应该是要通过update调一下flush的。如果直接调flush, ts_flush不会被设置。 另外,也可以在update里检测一下所有的resendts来避免这个问题。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasonable
@skywind3000 Is this worth it? |
直接调 flush 呗 |
我在epoll中集成KCP也遇到这个问题。 我的设计是:
在上述第1条有一处: |
按照作者的答复来看,当 但是,我手动 |
经过调整后,有效,伪代码如下:
|
ikcp_check检测到有需要重发的segment,但是没有更新 ts_flush,ikcp_update可能判断不需要flush,直接返回