|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Wednesday, 20 June 2001||Author: Dustin Puryear|
|Published to: develop_articles/Development Articles||Page: 1/1 - [Printable]|
Book Review: The Pocket Guide to TCP/IP Sockets
Correspondent Dustin Puryear take a look at the freshly published book from Morgan Kaufman, the venerable computer science and textbook publisher. The Pocket Guide to TCP/IP Sockets is a very good book.
|Page 1 of 1|
IntroductionThe Internet is a complex beast composed of various services and protocols that move data from one point to the next. For those new to network programming these protocols can be difficult to understand. Fortunately, there is plenty of documentation, including the venerable "UNIX Network Programming," by W. Richard Stevens. Yet, these texts are large and all-inclusive--in other words, there is a tremendous amount of information for readers to wade through in order to arrive at a level of competence.
A solution to this dilemma is the recently released The Pocket Guide to TCP/IP Sockets, published by Morgan Kaufmann Publishers (http://www.mkp.com). The authors, Michael J. Donahoo of Baylor University and Kenneth L. Calvert of the University of Kentucky, embarked on a mission to condense the critical knowledge required to understand and use TCP/IP into a guide that can serve as a compliment to a more well-rounded text or that can stand on its own.
The Pocket Guide to TCP/IP Sockets is a small book. It contains 130 pages including the index, seven chapters, and an "API Reference." Each chapter focuses on a specific topic, beginning with an introduction to TCP/IP and ending with the Domain Name Service, in addition to sample code in C, as discussed below.
Chapter 1, "Introduction," is a basic introduction to the layout of TCP/IP networks. In addition, the authors introduce the reader to the Berkeley Socket Interface, which is an abstraction that eases the use of the IP networking layer. In a book this size the authors are wise in keeping this chapter short and tightly focused.
The book then progresses into Chapter 2, "Basic Sockets," which covers socket programming in more detail. Specifically, an overview of creating and destroying sockets is given as well as sending basic messages between a client and server. In addition to the text the authors provide an excellent working example in the form of both a TCP echo server and client.
Once the reader has been introduced to socket programming the authors move to the issue of providing a portable means of moving data in Chapter 3, "Constructing Messages." This chapter focuses on encoding data, byte ordering (Little Endian versus Big Endian), word alignment, and message parsing.
In Chapter 4, "Using UDP Sockets," Donahoo and Calvert delve into UDP sockets. This chapter is very similar to Chapter 2 with a simple change in focus from TCP to UDP.
The next topic covered is the various options and optimizations possible using the socket interface in Chapter 5, "Socket Programming." Issues addressed include signals, nonblocking I/O, and methods for handling multiple clients concurrently. This chapter is essential reading for anyone needing to build production code in any environment.
In Chapters 6 and 7, "Under the Hood" and "Domain Name Service" respectively, the authors tie up a few loose ends. More specifically, in "Under the Hood" several implementation details are discussed concerning the Berkeley Socket Interface. "Domain Name Service" covers using the resolver to resolve host names to IP addresses and vice versa.
Finally, the books ends with a good API reference totaling eleven pages. The reference is extremely valuable, although it doesn't contain the same level of information as most modern UNIX man pages, which can be quite extensive. However, all of the information is in a compact, easy to read form, which can't always be said of man pages.
This is an excellent book. It's small, and that's important for most developers that just need the core knowledge to get started on their own path of learning. Certainly, in order to become a proficient TCP/IP programmer you will need to read larger, more involved texts, but that is not the reasoning behind The Pocket Guide to TCP/IP Sockets. This book's focus is to get you up and running in a very short amount of time, and it fulfills that mission nicely.
Dustin Puryear is a professional working in the Information Technology industry. He is author of Integrate Linux Solutions into Your Windows Network, as well as numerous articles for both print and online publications. He may be reached at firstname.lastname@example.org.
|Page 1 of 1|