I am trying to implement non-blocking for socket recv and the problem is that I got an error -1 when there in no data but I expect to get EAGAIN error.
recv
EAGAIN
I got an error -1 when there in no data but I expect to get EAGAIN error.
-1 tells you there is an error. errno tells you what the error was.
errno