We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
阅读源码发现在stream=1的时候,ikcp_send 做数据分段发现如下代码:
if (len <= (int)kcp->mss) count = 1; else count = (len + kcp->mss - 1) / kcp->mss; if (count >= (int)IKCP_WND_RCV) return -2;
即使流模式也会限制分段的数量,感觉似乎没必要;这样上层大于127就要自己分成多次调用ikcp_send。 有其他的原因吗?
The text was updated successfully, but these errors were encountered:
因为 kcp 不是流式的,窗口需要容纳下一个完整的消息才行。
Sorry, something went wrong.
@skywind3000 非流模式我能理解,一个完整消息需要在窗口之内。 但流模式的frg似乎一直都是0,每次从KCP接收只返回一个segment。
现在上层发送过大的包也要分成多次调用ikcp_send;而流模式接收的时候并不是按发送多少次就接收多少次,是一个个segment接收。这样在流模式下限制包大小好好像不是很必要?
No branches or pull requests
阅读源码发现在stream=1的时候,ikcp_send 做数据分段发现如下代码:
即使流模式也会限制分段的数量,感觉似乎没必要;这样上层大于127就要自己分成多次调用ikcp_send。
有其他的原因吗?
The text was updated successfully, but these errors were encountered: