EAGAIN The file descriptor fd refers to the file besides a socket and has been marked nonblocking (O_NONBLOCK), plus the write would block. See open(two) for additional facts around the O_NONBLOCK flag. EAGAIN or EWOULDBLOCK The file descriptor fd refers to your socket and has been marked nonblocking (O_NONBLOCK), as https://global-miracles.net/Portuguese_AM/publications_port/UCEM/um-curso-em-milagres.pdf