Smallsockets is cool, although I recommend learning BSD sockets first (Smallsockets is a wrapper).
Hmm. There's this tutorial called "Beej's Guide to Network Programming" or something like that. Read through that, do the examples, and then try SmallSockets.