IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-14
accept_nw
exit (0);
/* Call AWAITIOX */
/* Before calling accept_nw, program must call bind_nw and
* listen. A call to AWAITIOX must follow the bind_nw call.
*/
flen = sizeof(from);
cc = accept_nw(fd1, (struct sockaddr *)&from, flen, t);
if (cc < 0) {
perror (“Server: Accept failed.”)
exit (0);
}
else {
/* Call AWAITIOX using socket fd1 and tag t. */
...
if ((fd2 = socket_nw(AF_NV, SOCK_STREAM,0,021,0)) < 0) {
perror (“Server Socket 2 create failed.”)
exit (0);
}
else {
/* Call AWAITIOX using socket fd2. */
};...
cc = accept_nw2(fd2, (struct sockaddr *)&from, flen, t);
if (cc < 0) {
perror (“Server: Accept failed.”)
exit (0);
}
else {
/* Call AWAITIOX using socket fd2 and tag t. */
...
};