TCP/IP Sockets in C by Donahoo and Calvert - Probably the best
handbook on sockets programming. I highly recommend this book as an addition
to your personal library. The book website has some very useful sample programs
(see here).
I use the bcc32 and cl command line compilers to build my programs. If you
want to use the Microsoft Visual IDE, see
here for helpful instructions. The net is that you must build a console
application and include wsock32.dll in the Project Settings / Object-library
modules list.