EBADF The socket descriptor is invalid.
ECONNRESET A connection was forcibly closed by a peer.
EFAULT The message argument is not in a readable or
writable part of user address space.
EINTR This function was interrupted by a signal
before any data was available.
EINVAL The MSG_OOB flag is set, and no out-of-band
data is available.
The value of the msg_iovlen member of the
msghdr structure is less than or equal to zero
or is greater than IOV_MAX.
ENOBUFS The system has insufficient resources to
complete the call.
ENOMEM The system did not have sufficient memory to
fulfill the request.
ENOTCONN A receive is attempted on a connection-
oriented socket that is not connected.
ENOTSOCK The socket descriptor is invalid.
EOPNOTSUPP The specified flags are not supported for this
socket type.
EWOULDBLOCK The socket is marked nonblocking, and no data
is ready to be received.