That assumes the server (the application at the other end of the socket) runs continually and the connection between your application and the server is undisturbed. If something happens to change that while doing a read() (eg the server closes the connection) a common result is a timeout. That's one reason to return recv() over read() ... it gives your application ...