17.7. Socket Errors A number of errno values occur only with sockets. Here is a list of socket-specific errors and a short description of each: EADDRINUSE A requested address is already in use and cannot be reassigned. EADDRNOTAVAIL An unavailable address was requested. EAFNOSUPPORT An unsupported address family was specified. ECONNABORTED The connection was aborted by software. ECONNREFUSED The remote machine refused the connection attempt. ECONNRESET The connection was reset by the remote end. This usually indicates that the remote machine was restarted. EDESTADDRREQ An attempt was made to send data over a socket without providing the destination address. This can occur only for datagram sockets. EHOSTDOWN The remote host is not on the network. EHOSTUNREAD The remote host cannot be reached. EISCONN A connection is already established for the socket. EMSGSIZE The data being sent through a socket is too large to be sent as a single, atomic message. ENETDOWN The network connection is down. ENETRESET The network was reset, causing the connection to be dropped. ENETUNREACH The specified network cannot be reached. ENOBUFS Not enough buffer space is available to handle the request. ENOPROTOOPT An attempt to set an invalid option was made. ENOTCONN A connection must be established before the operation can succeed. ENOTSOCK A socket-specific operation was attempted on a file descriptor that references a file other than a socket. EPFNOSUPPORT An unsupported protocol family was specified. EPROTONOSUPPORT A request was made for an unsupported protocol. EPROTOTYPE An inappropriate protocol type was specified for the socket. ESOCKTNOSUPPORT An attempt was made to create an unsupported socket type. ETIMEDOUT The connection timed out. |