Chapter 7, Developing applications over TCP/IP using Internet sockets
Socket creation errors

Socket creation errors

The most common errors returned during socket creation are: 

EPROTONOSUPPORT
The protocol type or the specified protocol is not supported within this domain.

EMFILE
The per-process descriptor table is full.

ENFILE
The system file table is full.

EACCESS
Permission to create a socket of the specified type and/or protocol is denied.

ENOBUFS
Insufficient buffer space is available. The socket cannot be created until sufficient resources are freed.
If a connection fails at any time, the socket cannot be re-used; it must be closed and a new socket created.