VMS Help TCPIP Services, Programming Interfaces, Sockets API, accept(), Description *Conan The Librarian (sorry for the slow response - running on an old VAX) |
This function completes the first connection on the queue of pending connections, creates a new socket with the same properties as s, and allocates and returns a new descriptor for the socket. If no pending connections are present on the queue and the socket is not marked as nonblocking, accept() blocks the caller until a connection request is present. If the socket is marked nonblocking by using a setsockopt() call and no pending connections are present on the queue, accept() returns an error. You cannot use the accepted socket to accept subsequent connections. The original socket s remains open (listening) for other connection requests. This call is used with connection- based socket types (SOCK_STREAM). Related Functions See also bind(), connect(), listen(), select(), and socket().
|