C Recommended books for BSD socket programming

I'm now reading the second edition of Internetworking with TCP/IP, vol. III, "client-server programming and applications". It's the BSD socket version with ANSI C code. I'm not that far into the book yet (p. 149) but I really like the book so I will probably read it cover to cover a few times.

However good this book may still be, it still is from 1996 so I was wondering, perhaps there are newer books on the topic of BSD socket programming which are equally or nearly as good with different accents, new concepts, etc. Any recommendations?
 
What are you trying to accomplish?

Depending on the answer to that, there may be much better answers today, which operate at much higher sematic levels, and take a lot of the work (and the potential for making mistakes) away from you, and are optimized for certain tasks.
 
Goal: learn C programming. I'm also reading though K.N. King's second edition of C programming: A modern approach (modern is relative here as the book is from 2008). I found King's book recommended in quite a few places online and altough it might be a very good book on explaining how to program in C, it lacks socket programming so that is when I found the third volume from Comer, mentioned above.
 
Sorry, if your goal is actually to use sockets "because they're there" (not to solve a concrete problem), then I don't know which book to recommend. The last time I did this in C/C++ was in the early 2000s, and I simply used existing code from colleagues as a guide, and the man pages as a reference.

You might want to grab the 3-volume set "TCP/IP illustrated" by Rich Stevens from the library, and skim it. Excellent books. They might have code examples for how to use sockets. They are also chock full of explanations of how the stuff underneath actually works. Fabulous books in general, but not suitable for learning C.

Just out of curiosity: Why do you want to learn C? I see lots of people here on this forum who think that programming in C is the greatest thing ever, and absolutely want to learn it, and do it, and sometimes want everyone else to do it exclusively. I don't get that. I've been programming in C (and derived languages, such as C++) since the early 90s, and today I see it as the least suitable language for most problems, to be avoided if possible.
 
I want to learn C so that I can better understand the source code of BIND and other software, perhaps even contribute to these open-source projects over time. C certainly isn't the greatest thing since sliced bread. I use Python for all of my scripts and web applications.

The three-volume set "TCP/IP illustrated" is comparable to Comer's three-volume set which I'm already reading. And Comer's books are "newer".
 
Back
Top