Taken from the original at http://www.ecst.csuchico.edu/~beej/guide/net/ ... see end of writeup for Copyright statement.

Beej's Guide to Network Programming Using Internet Sockets

Version 1.5.5 (13-Jan-1999)


Intro

Hey! Socket programming got you down? Is this stuff just a little too difficult to figure out from the man pages? You want to do cool Internet programming, but you don't have time to wade through a gob of structs trying to figure out if you have to call bind() before you connect(), etc., etc.

Well, guess what! I've already done this nasty business, and I'm dying to share the information with everyone! You've come to the right place. This document should give the average competent C programmer the edge s/he needs to get a grip on this networking noise.


Audience

This document has been written as a tutorial, not a reference. It is probably at its best when read by individuals who are just starting out with socket programming and are looking for a foothold. It is certainly not the complete guide to sockets programming, by any means.

Hopefully, though, it'll be just enough for those man pages to start making sense... :-)


Platform and Compiler

Most of the code contained within this document was compiled on a Linux PC using Gnu's gcc compiler. It was also found to compile on HPUX using gcc. Note that every code snippet was not individually tested.


Contents:


Copyright © 1995, 1996 by Brian "Beej" Hall. This guide may be reprinted in any medium provided that its content is not altered, it is presented in its entirety, and this copyright notice remains intact. Contact beej@ecst.csuchico.edu for more information.