IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-12
accept_nw
accept_nw
The accept_nw function checks for connections on an existing nowait socket. It is
designed to be followed first by a call to socket_nw to create a new socket, then a
call to accept_nw2 to accept the connection on the new socket.
error
is the return value. If the call is successful, a zero is returned. If the call is not
successful, -1 is returned. If the call failed, the external variable errno is set as
indicated below in “Errors.”
socket
specifies the socket number, created by a previous socket_nw call, to be used to
check for connections.
from_ptr
points, on return, to the remote IPX address data structure for the new connection
from which the connection was initiated. This is an output parameter.
from_len1
points to a value indicating the size in bytes of the structure pointed to by
from_ptr. Set the from_len1 used in the accept_nw call to point to the size of
the sockaddr struct before making the call. accept_nw will then return the
C Synopsis
#include <socket.h>
#include <nv.h>
#include <netdb.h>
error = accept_nw (socket, from_ptr, from_len1, tag);
int socket, *from_len1, error;
long tag;
struct sockaddr *from_ptr;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := accept_nw (socket, from_ptr, from_len1, tag);
INT socket,
INT .EXT from_len1;
INT(32) tag;
INT .EXT from_ptr (sockaddr);