Linux Socket Programming Paperback – 26 Jan 2001
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
From the Back Cover
This book teaches readers how to program Linux sockets, and gives them everything they need to know to make programs communicate effetively over networks.
It presents a comprehensive discussion of all relevant topics including- writing programs compatible with both Internet Protocol version 4 (IPv4) and IPv6, raw sockets, User Datagram Protocol (UDP), broadcasting /multicasting, server internals, and more, plus a section covering Posix threads.
It provides thorough coverage of programming with the TCP, UDP, and IP protocols, as well as lower-level raw sockets. The myriad of function calls, data structures, and options associated with the APIs are explained with well-chosen diagrams and tables.
After reading this book, the reader will be able to-
Differentiate basic datagrams vs. streaming sockets.
Differentiate unicast, broadcast, and multicast sockets.
Write socket-based network programs.
Write portable code for various OS.
Implement client-server and peer communications
Increase network throughput using "connectionless" communications
Manage asynchronous I/O, I/O and multiple sockets.
Use signals, threading and processes to manage socket connections.
Understand new socket technologies like Mbone and 6bone.
Understand Remote Procedure Calls and how to implement them.
Understand the different socket addressing types.
About the Author
Sean Walton MSCS, formerly a lead design technology specialist and configuration management team lead on the process improvement team at Nationwide Financial has also worked for Hewlett Packard where he developed the automatic language detection feature found on the LaserJet printers (patent #5,392,419). Sean also developed a real time micro operating system for the 8052 microcontroller for emulating printer engines. Sean got his MSCS in 1990 from BYU specializing in merging language and multitasking theory. He has many years of professional experience in several types of UNIX programming and administration including Linux, Ultrix, SunOS and System V. Because of this background, he focuses on system-independent programming that facilitates easy porting.
Most Helpful Customer Reviews on Amazon.com (beta)
Problems started with chapter 1. The writing style is extremely choppy. The book references sample code on the included CD-ROM and in the back of the book. Guess what? No CD and no code appendix. We are not talking just one reference to this. There are several in chapter one and the part of chapter two I read kept refering to the CD for RFCs.
So, you might say, perhaps there is a web site with code. Eureka! there is. So I happily try to compile the sample simple-client code for chapter 1. One error, one warning, and code that doesn't match what is said in the book. Specifically: the error was caused by forgetting to #include <errno>, warning on line 62 because there needs to be an explicit cast to (struct sockaddr*) and finally in big bold letters in a gray box the author states that the book's sample code will use PF_ prefixes vs AF_. Not true in the code I looked at.
I did email the author and received a quick response. He let me know that he was having to foot the bill for the web site. Shame on the publisher for the lack of support. But shame on Mr. Walton for publishing such unpolished code.
Maybe the rest of the book is ok. Explantions were extremely shallow in chapter one when talking about function calls and structures with references to RFCs and other resources. I paid for the book to be a resource, not to be referred other places. What explanations there were jumped all over the place without any real meat, sometimes using useless analogies. I didn't feel like fighting my way through the rest of it. I broke down and ponied up for Stevens TCP/IP Illustrated Volume 1 and Unix Network Programming Volume 1.
Now back to the book reviewed. I bought it because it seemed to elaborate a bit more on a subject covered only briefly by Stevens: concurrent network I/O in real-world conditions. Well, it did have a special section on the subject but it didn't provide any particular information I was looking for:
- analysis of different I/O methods' behavior under different load conditions
- throughput analysis
- applicability of different methods in different UNIX flavours (Oops, this is a book for Linux! Still, it would be nice if the author at least mentioned the portability issues)
- while the examples were nice and clear, it would make sense to create an I/O abstraction layer that would act as a (de)multiplexor and to change only this layer for every I/O paradigm.
So, once we get past the section on real-world network I/O issues, what we are left with is a decent yet not perfect book on network programming. It will teach you how to develop network applications for Linux but it won't provide the same depth UNPv1 does.
Conclusion: Read it if you want to quickly start developing network apps and you don't have time for UNPv1. Otherwise go for UNPv1. Still, it is worthwhile to skim through the sections on throughput and performance.
If you wants to develop TCP/IP programming, this is THE book.