Recv issue
-
Hi, I have a problem with the recv() function. it seems to hang!!! There is a provision to exit out of recv() but doesn't seem to help!!! Here's the extract!! ========================================================== while ( ii != 0) { ii = recv(sd,aa,1000,0); } printf("%d %s",ii,aa); } =========================================================== Any Help would be appreciated!!! Brgds, John:confused::
-
Hi, I have a problem with the recv() function. it seems to hang!!! There is a provision to exit out of recv() but doesn't seem to help!!! Here's the extract!! ========================================================== while ( ii != 0) { ii = recv(sd,aa,1000,0); } printf("%d %s",ii,aa); } =========================================================== Any Help would be appreciated!!! Brgds, John:confused::
MSDN: Return Values If no error occurs, recv returns the number of bytes received. If the connection has been gracefully closed, the return value is zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError. Papa while (TRUE) Papa.WillLove ( Bebe ) ;