The number of bytes read, which will not exceed the maximum size, sz. A negative value is returned if an error has occurred, in which case errno is set to one of the following constants:
ETIMEDOUT if the read operation did not complete before timeout seconds elapsed.
EAGAIN if non-blocking I/O is enabled on the socket descriptor and the socket was temporarily unavailable.
EWOULDBLOCK if non-blocking I/O is enabled on the socket descriptor and the read operation would have blocked.