EAGAIN The file descriptor fd refers into a file other than a socket and has actually been marked nonblocking (O_NONBLOCK), and also the write would block. See open(two) for even further specifics over the O_NONBLOCK flag. EAGAIN or EWOULDBLOCK The file descriptor fd refers into a socket and continues to https://www.youtube.com/watch?v=9S7-cKLweYE