This document was created by man2html using the manual pages.
Section: Linux Programmer's Manual (2) Return to NetAdminTools
accept - accept a connection on a socket int accept(int s,
struct sockaddr *addr, socklen_t *addrlen); function is used
with connection-based socket types It extracts the first
connection request on the queue of pending connections, creates
a new connected socket with mostly the same properties as and
allocates a new file descriptor for the socket, which is
returned. The newly created socket is no longer in the listening
state. The original socket is unaffected by this call. Note that
any per file descriptor flags (everything that can be set with
the fcntl, like non blocking or async state) are not inherited
across is a socket that has been created with bound to a local
address with and is listening for connections after a is a
pointer to a sockaddr structure. This structure is filled in
with the address of the connecting entity, as known to the
communications layer. The exact format of