Yes, I finally finished reading this book.
As a person who has never taken a computer networking course in university, I had thought for a long time of learning that subject intensively. However, I could not find a solid university course that is open to public(something like MIT’s introduction to algorithms). And many of the textbooks prefixed “introduction” spent hundreds of pages explaining quite low-level concepts such as routing algorithms or even physical wires that connect the continents!
Then I found Beej's Guide to Network Programming that is recommended frequently on the Internet. At a glance, I found it easy to read because of the author’s way of explaining concepts in a humorous manner. But at the same time, compared to other computer network books, this book contains many code examples, so that I thought it suits more for the programmers who want practical socket programming practice.
And after reading through all the chapters except chapter 9(because it is more like a reference for a bunch of C socket functions), I found it a good read.
The book starts with a few basic concepts such as IP, port, and socket. However, it doesn’t go deeper into introducing very technical algorithms or physical devices used for network communications. As a developer who deals with web applications daily, I found it more relevant to my job. Even though the book sometimes mentions bits and bytes, it is still readable and you usually never do any bitwise operations while reading the C code in the book.
For those who want to get their hands dirty with code, this book is for you. Except for the general overview parts on computer networking, most of the explanations in the book come with code examples in C. This is particularly useful for knowing how actual network communications occur inside our web applications. For example, the polling operation sweeps through all the registered sockets to check whether there are incoming events to be handled.
Moreover, the examples don’t import any external libraries, so you don’t have to deal with irritating third-party dependency problems.
This book is very good as a friendly reference to socket programming and relevant system calls. However, it does not go “higher” or “lower”:
However, I found another good resource written by the same author: Beej's Guide to Networking Concepts. It seems to cover many core concepts more comprehensively than this book with a lot of coding exercises. I hope this “concept” book will fill the gap of the “programming” book.
If you don’t know much about C programming, this book could be overwhelming. It doesn’t explain any basic concepts such as pointers or type casting. Although we don’t suffer from dependency hell like when dealing with CMake, if you don’t know much about C then reading code would still be difficult.
Personally I am okay with C code. However, the book could have been more beginner-friendly if it were written in Python, which has almost all the counterparts of the socket functions of C in its socket library. The "concept" book by the same author uses Python this time, so we can expect some fun there.
Overall, the book is filled with practical code examples that are useful when understanding a network application using socket system calls. Of course, you won’t really need to use these functions when writing your own application, because many languages support their own wrappers for those "low-level" socket networking functions(Python has libraries like socketserver and http). Nonetheless, I think once in your career as a developer you should understand what is going on behind all these highly abstracted communications using HTTPS or websocket. In that sense, this book is a good read and also a good reference.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3