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

epoll边缘触发数据未读完的问题 #5

Open
charlesgreat opened this issue May 21, 2020 · 3 comments
Open

epoll边缘触发数据未读完的问题 #5

charlesgreat opened this issue May 21, 2020 · 3 comments

Comments

@charlesgreat
Copy link

epoll边缘触发的话 有读事件的话 一次需要读取完 目前实现存在读取缓冲区太小时数据没读取完的情况 有做改进吗?
得设置个标志,超过缓存大小的话,后面得主动再次读取 即使缓冲区很大也不行 因为客户端可能一直不停的发

@xtaci
Copy link
Owner

xtaci commented May 21, 2020

不需要读完啊, 不读完,自然就通过流控传导给客户端使其停止发送了

@charlesgreat
Copy link
Author

不读完怎么触发再次读取没有读取的数据呢?比如客户端发送了500个自己的完整数据,只读取了250个,是不完整的。

@xtaci
Copy link
Owner

xtaci commented May 22, 2020

那就再读一次,你不再读一次,怎么知道有没有读完呢,或者有新数据到达呢

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