Five Pitfalls of Linux Sockets Programming (developerWorks)
Posted Sep 22, 2005 0:33 UTC (Thu) by
ratz (guest, #32588)
In reply to:
Five Pitfalls of Linux Sockets Programming (developerWorks) by RobSeace
Parent article:
Five Pitfalls of Linux Sockets Programming (developerWorks)
>The "TCP/IP Illustrated" books are wonderful, but they are more useful for
>understanding the guts of how TCP/IP works at a low level... For actual
>sockets coding, I think the most useful Stevens' book (in fact, the most
>useful book, period) is "Unix Network Programming"... (Now, actually, a
>2-volume set, with the modern second edition...
Yes, I forgot to add this one while editing the text. This certainly is
an excellent reference. This reminds me that I should re-organise my
bookshelf and group all Stevens books back together.
>The version I learnt from
>in college was a single volume... With the modern one, really only the
>first volume is necessary for sockets coding...)
[...]
>Nah, not really... Certainly not any more than any other Unix-like OS
>does, anyway...
For basic stuff agreed (after all the socket interface in Linux is
claimed to be POSIX compatible), but there are things that require you
to read either sys/socket.h and the other headers from there or the kernel
code. I don't have many examples ready, but consider a simple thing like
the backlog queue size (settable in the listen() call for example) and
mechansim. The implementation differs on a lot of Unices and its derivates.
> They all have their own little quirks and system-specific
>additions and tweaks... But, the core stuff is pretty portable to them
>all... (Oh, and I wouldn't trust man pages too much, either... I've been
>lied to by them more than once... ;-) But, they're certainly worth
>consulting... Just don't blindly believe everything you read there... ;-))
I know :). Had a couple of beers with the author(s) already but this
didn't help much. Every once in a while someone shows up on netdev ml
and proposes to address the man page issues, and then they vanish forever.
(
Log in to post comments)