O'Reilly logo

TCP/IP Sockets in C, 2nd Edition by Kenneth L. Calvert, Michael J. Donahoo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3 Of Names and Address Families

At this point, you know enough to build working TCP clients and servers. However, our examples so far, though useful enough, nevertheless have a couple of features that could be improved. First, the only way to specify a destination is with an IP address, such as 169.1.1.1 or FE80:1034::2A97:1001:1. This is a bit painful for most humans, who are—let’s face it—not that good at dealing with long strings of numbers that have to be formatted just right. That’s why most applications allow the use of names like www.mkp.com and server.example.com to specify destinations, in addition to Internet addresses. But the Sockets API, as we’ve seen, only takes numerical arguments, so applications need a way to convert ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required