|Delphi Clinic||C++Builder Gate||Training & Consultancy||Delphi Notes Weblog||Dr.Bob's Webshop|
|Linux Socket Programming|
533 pages (no CD-ROM)
Linux Socket Programming is a new book from SAMS about a topic that will always be relevant. The title says it all: this book is about socket programming for Linux; using C/C++ and Java language examples.
Although sockets do not seem a topic you could write an entire book about, the author still succeeded in filling more than 500 pages with sensible information.
The book is divided in five parts.
The first part introduces network programming from the client perspective.
This part introduces sockets, different internet packet types and the network layering model.
Especially if you're new to networking and sockets, then this is a well-written introduction that will take you by the hand and teach you what it is all about.
Several little blocks inside the text contain helpful definitions (easy to spot when using the same material as reference).
Much of the source code or instructions are best directly applied (i.e. you may want to put this book next to your keyboard and see the results for yourself.
Although the book doesn't contain a CD-ROM with the source code, it helps that the listings are never long - only the relevant snippets are shown.
The second part of the book follows the first part by introducing the server perspective and load control. In this part we get a server primer, learn about multitasking and performance, and how to design robust Linux sockets. Especially this last chapter is important when you want to end up writing commercial-grade clients and servers. Issues like signals (sispipe, sisurg, sischld, sighup, sigio and sigalrm), resource management (file, memory, CPU) and critical servers are covered. For critical servers, we'll also read about session recovery techniques and concurrency issues (network deadlock, starvation and denial-of-service attacks).
The third part of the book starts to use Object Oriented Programming as a means to work with sockets. So far, most examples were using C or plain Linux APIs or commands only. Now, we start using objects, see Java's networking API as well as a C++ socket framework, and we end this part with some observations about the limitations of objects (more general observations on Object Technology). All in all, this was the smallest part of the book, but not the least interesting one to read.
The fourth part of the book was about advanced socket programming. Here we read and learn all about Remote Procedure Calls (RPCs), security using SSL (secure socket layer) and sharing messages with Multicast, Broadcast and Mbone. Not all of these techniques will be of immediate use, but you can use this book in two ways: both as a reading book (from cover-to-cover) and a reference book (reading chapters on a need-to-know basis). The last chapter of this part, introducing IPv6, the next generation to IP, falls in the "nice to read now, but good to have for later" category.
The fifth and last part of the book contains four appendices. Appendix A lists all tables and data formats relevant to socket programming on Linux. Appendix B lists all the networking library and system calls on Linux. This is the most helpful appendix from the book, because it not only shows the prototype and description of each function, but also many small examples. Appendix C lists a number of manual pages of the Linux kernel and system calls that are also relevant to sockets. And finally Appendix D lists a number of C++ and Java classes that were used in the book (like exceptions and support classes).
The index takes 34 pages, but the chapter topics are clear enough that I often look at the table of contents before looking into the index.
This book contains a lot of knowledge and practical information for socket programming under Linux.
If you need work with sockets on Linux, and know almost nothing about the topic, then this book can teach you a lot.
You can both use it as a reading book (first) but also as a reference manual (later), especially part 4 and the appendices will come in handy as reference material.
I can recommend this book to anyone who needs to implement sockets on Linux (using C/C++ or Java).
|More Book Reviews|