2

I've just been looking at the following books: -K&R C -The Complete Reference C++ -The Complete Reference C -Deitel How to Program C -Deitel How to Program C++

and not one of them contains any networking, how to create sockets etc. Is there any 'definitive' reference for C network programming? Google wasn't particularly helpful.

I'm probably considering windows and unix platforms

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
Paul
  • 167
  • 2
  • 6

3 Answers3

16

"C books" usually describe the language and the standard library. Sockets aren't in the standard library.

If you want a good book on sockets, UNP by Stevens is arguably the best.

cnicutar
  • 178,505
  • 25
  • 365
  • 392
1

I agree with cnicutar's answer...

If you need a good starting point - see http://beej.us/guide/bgnet/output/html/multipage/index.html

Yahia
  • 69,653
  • 9
  • 115
  • 144
1

The C/C++ is a language, and the networking is not part of the language, and that is the why

If you do

   man 2 accept
   man 2 select
   man 2 connect
   man 2 recv
   man 2 send

you will see template code and references needed for most of your TCP networking need

Soren
  • 14,402
  • 4
  • 41
  • 67