Lc Listing 176 reqportcThe reqport Function

8: * Request a INADDR_ANY socket on the 9: * port number requested: 10: *

12: * s Socket to send request on

13: * port Port (host order) being requested

19: int

26: * Create a Unix Socket:

33: * Create the abstract address of

34: * the socket server:

36: memset(&a_srvr,0,sizeof a_srvr);

38: strncpy(a_srvr.sun_path,

39: "zSOCKET-SERVER",

40: sizeof a_srvr.sun_path-1);

44: * Connect to the sock server:

51: * Now issue our request:

55: } while ( z == -1 && errno == EINTR ); 56:

Was this article helpful?

0 0

Post a comment