in my server, I wish to recieve input up to newline, when the client pushes <enter>, for this I have a function copyed from a tutorial. readLine which reads up to a newline character. I swaped this for \r, but is not working corectly.

To debug after recv() I plased a WSAGetLastError and the return code 10035 "operation would block"

I researched this and apears the recv buffer is empty, so in the case of a non-blocking socket, recv does not wait for data to arive, it just returns SOCKET_ERROR and WSAGetLastError gives 10035

Im conecting with telnet to test, and its when i push a letter, so my question is, when i push a letter in telnet, is this not sent to the target machine? and if thats the case, when is the data sent? when is my recv buffer filled.

This is non-blocking socket.