z/OS Communications Server: IP CICS Sockets Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


listen() call

z/OS Communications Server: IP CICS Sockets Guide
SC27-3649-00

The listen() call performs two tasks for a specified stream socket:

  1. Completes the necessary binding if bind() has not been called for the socket.
  2. Creates a connection request queue of a specified length to queue incoming connection requests.

The listen() call indicates a readiness to accept client connection requests. It transforms an active socket into a passive socket. A passive socket can never be used as an active socket to initiate connection requests.

Calling listen() is the third of four steps that a server performs to accept a connection. It is called after allocating a stream socket with socket(), and after binding a name to the socket with bind(). It must be called before calling accept() to accept a connection request from a client.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014