IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-54
socket, socket_nw
socket, socket_nw
The socket function creates a socket for waited operations; the socket_nw function
creates a socket for nowait operations.
socket_file_number
is the socket number for the newly created socket. This is the return value. If the
call is not successful -1 is returned, and the external variable errno is set as
indicated below in “Errors.”
address_family
specifies the address format. The value given for this parameter must be AF_NV
for IPX/SPX.
C Synopsis
#include <socket.h>
#include <netdb.h>
socket_file_number = socket (address_family, socket_type,
protocol);
socket_file_number = socket_nw (address_family,socket_type,
protocol, flags, sync);
int socket_file_number, address_family, socket_type,
protocol, flags, sync;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
socket_file_number := socket (address_family, socket_type,
protocol);
socket_file_number := socket_nw (address_family,socket_type,
protocol, flags, sync);
INT address_family,
socket_type,
protocol;
flags,
sync;