IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-31
listen
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 IPX/SPX implementation, the
maximum pending connections is always 5. A call to listen must precede a call to
accept or accept_nw.
error
is always zero because no error can occur.
socket
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
specifies the maximum queue length (number of pending connections). If the
queue if full, the remote host gets a message indicating the connection was
refused. The queue length is always 5. For NonStop IPX/SPX, queue_length is
ignored.
Errors
No errors are returned for this function.
Example
For example that calls the listen function, see SPXII Server Program on page 6-1.
C Synopsis
#include <socket.h>
#include <nv.h>
#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 socket,
queue_length;