You are here : Csys/socket.haccept

accept() - sys/socket.h

The accept() function extracts the first connection on the queue of pending connections, creates a new socket with the same socket type protocol and address family as the specified socket, and allocates a new file descriptor for that socket.


Syntax

int accept (int socket, struct sockaddr *address,socklen_t *address_len);


Example


Output / Return Value


Limitations

Only available for Unix/Linux.


Alternatives / See Also


Reference