IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-56
socket, socket_nw
If a nowait depth greater than zero is specified, the nowait versions of the
socket routines must be used in all subsequent operations on the socket.
For nowait operations on a socket, set a nowait depth of 2 to allow pending
simultaneous reads and writes.
SETMODE 30 is called by socket_nw only if (flags & 0200) is false.
sync
is not supported for HP sockets. It must always be set to zero.
Errors
If an error occurs, the return value is set to -1 and the external variable errno is set to
one of the following values:
Usage Guidelines
The socket or socket_nw function opens the IPXPROTO process by name. The
function must know the name of this process. If your program calls the
socket_set_nv_name function before calling the socket or socket_nw
function, the socket library opens the process you specify.
If your program does not call socket_set_nv_name, the socket library opens the
process with the name specified for the =NETWARE^PROCESS^NAME file define.
Note that when a nowait socket is specified, you must call SETMODE 30 after the
AWAITIOX call. For details, see the description of the flags parameter.
For information on error checking, see Nowait Call Errors
on page 5-5.
Example
For an example that uses a call to the socket function, see the programs in Section 6,
Sample Programs. For an example that uses a call to socket_nw, see accept_nw on
page 5-12.
EAFNOSUPPORT The address family specified in address_family is not
supported.
ESOCKTNOSUPPORT The socket type specified in socket_type is not
supported.