Oh boy, this one brings me back. I can't tell you how many times I read this guide back in the day. Beej was the bomb when it came to network programming. Another great resource for network programming is http://www.madwizard.org/programming/tutorials/netcpp/ which is aimed more at Windows users. Failing that, there's the classic Unix Network Programming Vol 1 and 2 which gives a good outline of what to expect.
As it turns out, there are some really subtle aspects of network programming and these guides tend to cover them well.