Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update 能不能改到微妙级别 比如 100us #421

Open
SiNZeRo opened this issue Aug 16, 2024 · 4 comments
Open

update 能不能改到微妙级别 比如 100us #421

SiNZeRo opened this issue Aug 16, 2024 · 4 comments

Comments

@SiNZeRo
Copy link

SiNZeRo commented Aug 16, 2024

有个对延迟敏感的场景,不知道给予现在的代码方便改不

@SiNZeRo
Copy link
Author

SiNZeRo commented Aug 16, 2024

研究了下 是不是可以 send完直接flush,然后interval就算是10ms,一个rtt都至少10ms了,就让update来决定要不要重发什么的

@caoli5288
Copy link

100us你系统sysio直接炸了吧,什么数据量

@skywind3000
Copy link
Owner

一般 ikcp_input 或者 ikcp_send 之后调用下 flush 即可,可以保证数据即时收发,平时的定时 update 调用主要是判断重传是否即时,这个晚 1ms 根本不影响啥,tcp 的重传检测是按 TCP_RTO_MIN 触发的(200ms),还有个延迟 ack,100ms 起步,影响更大。

@SiNZeRo
Copy link
Author

SiNZeRo commented Aug 21, 2024

一般 ikcp_input 或者 ikcp_send 之后调用下 flush 即可,可以保证数据即时收发,平时的定时 update 调用主要是判断重传是否即时,这个晚 1ms 根本不影响啥,tcp 的重传检测是按 TCP_RTO_MIN 触发的(200ms),还有个延迟 ack,100ms 起步,影响更大。

嗯嗯 就flush了 让update重传 感谢!

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

No branches or pull requests

3 participants