The Sockets API is the de facto standard API for networking applications development. Although the API is simple, new developers can experience some common problems. This article identifies the most common of these pitfalls and shows you how to overcome them.
I don’t see anything in the article that is linux specific in any way.
“First introduced into the 4.2 BSD UNIX® operating system, the Sockets API is now a standard feature of any operating system.”
So… why the h*ll do they bother to specifically mention Linux in the title of the article and in some place in the article itself when there is nothing in it that is specific to Linux?
Could it be that IBM is yet again trying to make people think that these things only apply to Linux?
Maybe because it is not explained in Linux man pages?
The examples he gives are linux specific. Good article, been working on sockets all last week.
I don’t see anything Linux specific either. I only noticed little endian based constructs. These would apply to any PC unix. In the non-programming sections, he is using examples on how to use Linux netstat (a poor example I might add). That was unfortunate.
Seems pretty handy for someone new to sockets in the linux enviroment.
I know my first class that needed socket programming did nothing to show you how to use them correctly. The example code we were given was full of errors and things that should not be done. I know my first program could have been a bit better if I had a list such as this and a few other little things.
He didn’t mention ntoh or hton
Or maybe you could buy the superb “UNIX Network Programming” which covers socket programming, packet sniffing, raw socket programming, libnet api, the emerging SCTP and IPv6 protocols, broadcasting and multicasting in respect to standard UNIX environments, BSD and Linux.
This is an extremely useful book for anyone who’s going to be programming sockets in C on a *nix box. The only downside to the book is the horribly formated example code.