I would think so too, but I have
int sock = socket(AF_INET, SOCK_STREAM, 0);
and it still discards anything bigger than the buffer. I've rewritten my code to use a whole bunch of buffers now. But still, I feel like I've missed something that would have made this a whole lot easier.
Anyway...
Hi,
When using recv if the len parameter is shorter than the data in the buffer the remaining data is discarded. This seems strange to me, I thought I was reading from a stream? Is there anyway to read a fixed number of bytes and not loose the rest?
I know I can create my own buffer to read...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.