TCP/IP Programming Manual
NO_RECOVERY
Unknown server error.
NO_DATA
No address associated with hostname.
listen
The listen function is provided for compatibility only. In other socket implementations, listen
sets the maximum connections that are in the queue awaiting acceptance on a socket. In the
NonStop TCP/IP, Parallel Library TCP/IP, and NonStop TCP/IPv6 implementations, the maximum
pending connections is always 5. A call to listen must precede a call to accept or accept_nw.
C Synopsis
#include <socket.h>
#include <in.h>
#include <in6.h> /* for IPv6 use */
#include <netdb.h>
error = listen (socket, queue_length);
int error, socket, queue_length;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := listen (socket, queue_length);
INT error,
socket,
queue_length;
error
return value; always zero because no error can occur.
socket
input value; specifies the socket number for the socket being used to listen for connections (as
returned by a call to socket or socket_nw).
queue_length
input value; specifies the maximum queue length (number of pending connections). This argument
is ignored.
Errors
No errors are returned for this function.
Example
See C TCP Server Program (page 217) for examples that call the listen function.
recv, recv_nw
The recv and recv_nw functions receive data on a connected socket.
C Synopsis
#include <socket.h>
#include <netdb.h>
nrcvd = recv (socket, buffer_ptr, length, flags);
listen 153