xiv
Preface 9
robustness, the primary goal of our code examples is pedagogy, and the code is not necessarily
production quality. Especially in the early examples, we have sacrificed some robustness for
brevity and clarity.
Approach
This book will not make you an expert! That takes years of experience, as well as other, more
comprehensive sources [4, 16]. However, we hope it will be useful as a resource, even to those
who already know quite a bit about sockets. (Each of us learned some things in writing it.)
The first part of the book is a tutorial, which begins with "just enough" of the big picture,
then quickly gets into code basics via some example programs. The first four chapters aim
to get you quickly to the point of constructing simple clients and servers, such as might
be needed to complete introductory assignments. After that we branch out in Chapter 5,
introducing some of the many different ways to use sockets. Chapter 6 returns to basic socket
operation to provide more in-depth coverage of some of the underlying mechanisms and some
pitfalls to watch out for. Chapter 7 describes domain names and how they can be used to
obtain Internet addresses.
Chapters 5, 6, and 7 are essentially independent and may be presented in any order. Also,
if you are familiar with socket basics, you may wish to skip the introductory material and go
directly to those chapters. We placed the material on names at the very end of the tutorial part
in order to emphasize that the TCP/IP and UDP/IP services are completely independent of the
domain name system--a convenience, rather than an integral part of the network service.
Part II is a reference section that provides the declaration and a description of the
parameters for the main functions that make up the sockets API. It is intended to serve as
a quick reference for both novices and more advanced network programmers.
Acknowledgments
We would like to thank all the people who helped make this book a reality. Despite the book's
brevity, many hours went into reviewing the original proposal and the draft, and the reviewers'
input has significantly shaped the final result.
First, thanks to those who meticulously reviewed the draft of the text and made sug-
gestions for improvement. These include (in alphabetical order) Michel Barbeau, Carleton
University; Steve Bernier, Communications Research Center; Arian Durresi, Ohio State Uni-
versity; Gary Harkin, University of Montana; Ted Herman, University of Iowa; Lee Hollaar,
University of Utah; Shunge Li, GTE; Willis Marti, Texas A&M; Kihong Park, Purdue University;
Dan Schmitt, Texas A&M; and CSI4321, Spring 2000. Paul Linton of the University of Kentucky
helped in testing the code for portability. Any errors that remain are, of course, our responsi-
bility. We are very interested in weeding out such errors in future printings, so if you find one,
please send email to either of us. We will maintain an errata list on the book's Web page.