Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edition) Hardcover – Nov 14 2003
Frequently Bought Together
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
From the Inside Flap
PrefaceIntroductionThis book is for people who want to write programs that communicate with each otherusing an application program interface (API) known as sockets. Some readers may bevery familiar with sockets already, as that model has become synonymous with networkprogramming. Others may need an introduction to sockets from the ground up. Thegoal of this book is to offer guidance on network programming for beginners as well asprofessionals, for those developing new network-aware applications as well as thosemaintaining existing code, and for people who simply want to understand how the networkingcomponents of their system function.All the examples in this text are actual, runnable code tested on Unix systems.However, many non-Unix systems support the sockets API and the examples arelargely operating system-independent, as are the general concepts we present. Virtuallyevery operating system (OS) provides numerous network-aware applications such asWeb browsers, email clients, and file-sharing servers. We discuss the usual partitioningof these applications into client and server and write our own small examples of thesemany times throughout the text.Presenting this material in a Unix-oriented fashion has the natural side effect of providingbackground on Unix itself, and on TCP/IP as well. Where more extensive backgroundmay be interesting, we refer the reader to other texts. Four texts are so commonlymentioned in this book that we've assigned them the following abbreviations:
- APUE: Advanced Programming in the UNIX Environment Stevens 1992
- TCPv1: TCP/IP Illustrated, Volume 1 Stevens 1994
- TCPv2: TCP/IP Illustrated, Volume 2 Wright and Stevens 1995
- TCPv3: TCP/IP Illustrated, Volume 3 Stevens 1996
- This new edition contains updated information on IPv6, which was only in draft form at the time of publication of the second edition and has evolved somewhat.
- The descriptions of functions and the examples have all been updated to reflect the most recent POSIX specification (POSIX 1003.1-2001), also known as the Single Unix Specification Version 3.
- The coverage of the X/Open Transport Interface (XTI) has been dropped. That API has fallen out of common use and even the most recent POSIX specification does not bother to cover it.
- The coverage of TCP for transactions (T/TCP) has been dropped.
- Three chapters have been added to describe a relatively new transport protocol, SCTP. This reliable, message-oriented protocol provides multiple streams between endpoints and transport-level support for multihoming. It was originally designed for transport of telephony signaling across the Internet, but provides some features that many applications could take advantage of.
- A chapter has been added on key management sockets, which may be used with Internet Protocol Security (IPsec) and other network security services.
- The machines used, as well as the versions of their variants of Unix, have all been updated, and the examples have been updated to reflect how these machines behave. In many cases, examples were updated because OS vendors fixed bugs or added features, but as one might expect, we've discovered the occasional new bug here and there. The machines used for testing the examples in this book were:
- Apple Power PC running MacOS/X 10.2.6
- HP PA-RISC running HP-UX 11i
- IBM Power PC running AIX 5.1
- Intel x86 running FreeBSD 4.8
- Intel x86 running Linux 2.4.7
- Sun SPARC running FreeBSD 5.1
- Sun SPARC running Solaris 9
From the Back Cover
UNIX Network Programming, Volume 1: The Sockets Networking API, Third Edition
"Everyone will want this book because it provides a great mix of practical experience, historical perspective, and a depth of understanding that only comes from being intimately involved in the field. I've already enjoyed and learned from reading this book, and surely you will too."
--Sam LefflerThe classic guide to UNIX networking APIs... now completely updated!
To build today's highly distributed, networked applications and services, you need deep mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to-finish guidance for building robust, high-performance networked systems in any environment: UNIX Network Programming, Volume 1, Third Edition.
Building on the legendary work of W. Richard Stevens, this edition has been fully updated by two leading network programming experts to address today's most crucial standards, implementations, and techniques. New topics include:
- POSIX Single UNIX Specification Version 3
- IPv6 APIs (including updated guidance on IPv6/IPv4 interoperability)
- The new SCTP transport protocol
- IPsec-based Key Management Sockets
- FreeBSD 4.8/5.1, Red Hat Linux 9.x, Solaris 9, AIX 5.x, HP-UX, and Mac OS X implementations
- New network program debugging techniques
- Source Specific Multicast API, the key enabler for widespread IP multicast deployment
The authors also update and extend Stevens' definitive coverage of these crucial UNIX networking standards and techniques:
- TCP and UDP transport
- Sockets: elementary, advanced, routed, and raw
- I/O: multiplexing, advanced functions, nonblocking, and signal-driven
- Daemons and inetd
- UNIX domain protocols
- ioctl operations
- Broadcasting and multicasting
- Design: TCP iterative, concurrent, preforked, and prethreaded servers
Since 1990, network programmers have turned to one source for the insights and techniques they need: W. Richard Stevens' UNIX Network Programming. Now, there's an edition specifically designed for today's challenges--and tomorrow's.See all Product Description
What Other Items Do Customers Buy After Viewing This Item?
Top Customer Reviews
the original version (the one with a plain white
cover with blue lettering), but this new version
Chapter 12 (IPv4 and IPv6 interoperability) is extremely
valuable to slightly older developers like me that have
a fair bit of IPv4 socket programming experience but that
have not had time to plunge seriously into IPv6 socket
programming. Appendix A manages to give a fairly thorough
introduction to both IPv4 and IPv6 in less than 20 pages.
This will be very popular in universities.
The book also continues to be a living history of UNIX,
where many given API calls are not only defined and explained,
but documented as to how the API call came into being, how
many different versions of the function existed, why it got
changed and when, along with recommended do's and dont's...
All around, a must buy for developers and even
non-developers who want to understand a bit of the
the true nature of the 'plumbing' that underlies
After the concepts (a server 'listens' for a connection; a client initiates a connection) and basics of packets and sockets, the book presents a simple tcp server and client -- the server simply echos back whatever the client sends. Next, it discusses what can go wrong with the simple version, and presents an improved echo server that behave better when the client crashes (and likewise an improved client).
The book continues to improve on the basic client/server, including address resolution, and servers that handle multiple clients using forks, threads, non-blocking I/O. This is all I needed to learn from the book, and it's all in the first half of the book.
Particularly useful is Chapter 27, Client-Server Design Alternatives. To me it alone was worth the price of the book. Here the book discusses concurrent servers with three basic architectures:
(1) non-blocking I/O, no threads or forks (advantage: full control of resource allocation; disadvantag: complexity);
(2) spawn a thread or fork for each client (simplest implementation; potential problem of too many children);
(3) servers that pre-allocate a pool of threads or forks (a happy medium; faster).
Other chapters discuss broadcasting, multicasting, out of band data, routing sockets, and raw sockets; all topics I hope to learn some day. Again, this is a great book. The 3rd edition brings it up to date for IPV6 and numerous small improvements.
For those of us who have the first two editions of this book, the third edition has the following changes in effect:
· IPv6 updates. In the second version of the book, IPv6 was merely a draft and the sections covering IPv6 has been updated to take these changes into effect.
· POSIX updates. The functions/APIs and examples have been updated to reflect the changes to the latest version of the POSIX specification (1003.1-2001)
· SCTP coverage. 3 new chapters that cover this new reliable, message-based transport protocol have been added.
· Key Management Sockets coverage. Network security and its applicability and use with IPsec.
· Updated Operating Systems and machines that are used to run the examples in the book.
· Some topics such as Transaction TCP and X/Open Transport Interface have been dropped.
Many topics and sections have been updated with the authors' comments.Read more ›
From a simple HTTP GET to detailed network file and connectivity operations, including TCP and UDP packets, ports, sockets and so on, there is a place in the book for each kind of network programming service. There is also a fair amount of text dealing with debugging techniques, allowing even those programmers who are experienced in their craft to find new ways to ferret out the problems in their code. The book also promotes good stylistics in programming, engendering the idea that readable and understandable code is better code than that which simply works.
There are also examples and explanations for IPv6?, for any programmer who is going to be making the leap into next generation networks. There are also instructions on how to deal with wireless networks, security models and other topics for anyone who plans on designing network applications or specialized network configurations.
It's probably not accurate to rate a book on a topic that holds little interest to the reader, but even a modest script programmer can tell when a book hits a subject just right and brings out all the details in a concise, easy-to-understand way. If you're a hard-core network programmer, this book is definitely for you. If not, you may find you learn something anyway.
Most recent customer reviews
I bought this book about a month ago and used it very extensively for my UNIX programming project. While this book is great and very comprehensive, I did find code examples very... Read morePublished on April 6 2004
The book was great. It covers both the basics for the TCP/IP API in Unix and some advanced techniques of Network Programming. The book was a very easy read and flowed great. Read morePublished on Jan. 14 2004 by Heather
This book is a must have for anyone who writes networking code in C or C++ for UNIX/POSIX systems. It is complete, easy to understand, and stands up well both to skimming and to... Read morePublished on Jan. 8 2004 by David Schwartz
This will become the new classic of Unix Network Programming. When I first heard that there was a new edition, I was afraid that the classic would be destroyed. Read morePublished on Dec 16 2003 by Randy Given
There is no word to express how GOOD this book.I really suggest for novice to buy this book and i GUARANTEE that you WILL BECOME A NETWORK MASTER. Read morePublished on Dec 14 2003
I have UNP EEE, Green Cover, paperback, '93(I think). R. Stevens would be proud of this book. After 14 years, they **finally** got it right!(Zb)-peace-Published on Dec 8 2003
Look for similar items by category
- Books > Computers & Technology > Certification Central
- Books > Computers & Technology > Operating Systems > Unix
- Books > Computers & Technology > Programming > APIs & Operating Environments > Unix
- Books > Computers & Technology > Software
- Books > Qualifying Textbooks - Fall 2007 > Computers & Internet
- Books > Textbooks > Computer Science & Information Systems > Operating Systems