Here i give a small source, although a little outdated, serves a lot in terms of development, to facilitate public understanding of communications Server-Client, in the main Please comment only *. h because that's the structure of all packages only important, the CPP is an idea to see how it reads the gs and responding to customer

MegaUpload[Only registered and activated users can see links. ]

Credit to my friend Deathway.

Enjoy