IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-16
accept_nw2
Errors
If an error occurs, the external variable errno is set to one of the following values:
Usage Guidelines
This is a nowait call; it must be completed with a call to the AWAITIOX procedure.
For a waited call, use accept.
The accept_nw and accept_nw2 functions work together. The accept_nw
function checks for connections on an existing nowait socket. When a connection
request arrives, it returns the IPX address data structure, from which the
connection request came. A new socket should then be created with socket_nw.
Finally, the IPX address data structure, returned by accept_nw should be passed
to accept_nw2 to establish the connection on the new socket.
The call to accept_nw made before this call can be made in another process,
such as the LISTNER process.
For information on error checking, see Nowait Call Errors on page 5-5.
Example
See accept_nw on page 5-12, which also calls accept_nw2.
ECONNRESET The connection was reset by the peer process before the
accept operation completed.
EINVAL An invalid argument was specified.
ERSCH The socket specified in the new_socket parameter was
invalid. Close the socket using the FILE_CLOSE call.
Repeat the accept_nw, socket_nw and accept_nw2
sequence of calls.