This would allow error checking by the calling application. Just returning -1 is usually enough. I think a ::recv status of 0 should also be considered an error if it was successfully ::select-ed. From the recv() man page
RETURN VALUES
These calls return the number of bytes received, or -1 if an error
occurred.
For TCP sockets, the return value 0 means the peer has closed its half
side of the connection.