For a TCP blocking socket, is it safe to call:
if(SOCKET_ERROR != recv(s, NULL, 0, 0))
//...
to detect errors?
I thought it was safe, then I had a situation on a computer that it was hanging on this statement. (was with an ssl socket if that matters). I also tried passing in the MSG_PEEK flag with a buffer specified but I also had a hang there.
What is the alternative?