My (limited) experience from school is with handling raw bsd sockets. For something like that, there are so many subtleties and possible configurations that I pretty much needed to use a textbook as a reference whenever doing something. I know textbooks can be pretty heavy, but the one I used was actually really helpful.
It was called TCP/IP Sockets in C: A Practical Guide For Programmers. It's relatively short (~130 pages), has lots of code examples and reference material, and you can find a .pdf of it pretty easily just by googling (or pick it up for $20-$30 on Amazon).
Alternatively, you can find all of the official code samples online for free:
http://cs.ecs.baylor.edu/~donahoo/practical/CSockets2/textcode.html