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
服务器一次性发送10-20个包(小包),客户端接受出现严重延迟(1-2秒) #378
Comments
补充下,是客户端会同时收到这几十个包,但是延迟很久2-3秒的 秒级延迟 |
增大窗口 |
发送10个小包,也会延迟个4秒。 |
另外,发送10个小包,也会延迟4秒,需要每次发送都flush吗,我是每隔10ms会update |
底层的sendto一直都是能成功发送的,但是远端recvfrom 会一直返回没有数据可接受,过了一会才能收到所有数据。 随着发送的包越多,延迟越大。。 |
先检查你的 UDP 收发是否有问题,再看这里: https://github.com/skywind3000/kcp/wiki/Flow-Control-for-Users |
不好意思,之前log打印错了,又看了下,是ikcp_recv 一直返回-2,过了几秒才返回收到的所有包 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
场景如下:
服务器先连续发送几十-几百个包。发送完毕后,客户端开始接受,就会出现严重的延迟。
请教下,这个可能是什么原因?
另外又测试了下,如果发送一次,接受一次,模拟echo,就没有这个问题。
The text was updated successfully, but these errors were encountered: