Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this section, we use the functions presented in Section 59.10 to implement a library of functions to perform tasks commonly required for Internet domain sockets. (This library abstracts many of the steps shown in the example programs presented in Section 59.11.) Since these functions employ the protocol-independent getaddrinfo() and getnameinfo() functions, they can be used with both IPv4 and IPv6. Example 59-8 shows the header file that declares these functions.
Many of the functions in this library have similar arguments: