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

tcprecvdata_ex 函数逻辑有问题。 #9

Open
viperlong opened this issue Nov 24, 2016 · 2 comments
Open

tcprecvdata_ex 函数逻辑有问题。 #9

viperlong opened this issue Nov 24, 2016 · 2 comments

Comments

@viperlong
Copy link

viperlong commented Nov 24, 2016

第三个参数size,应该是接收buf长度,你默认为接收数据长度了。原来recv可以正常接收的。你可以测试下,你的接收过程中是有问题的。

@happyfish100
Copy link
Owner

没有错啊,这个参数的本意就是期望接收的字节数,通过count指针返回实际接收到的字节数。

@viperlong
Copy link
Author

如果缓冲中实际数据长度没有达到期望,你的函数不会返回。原来的recv是可以的,读完就返回。

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