I just want to say that there is this great library:
http://www.ararat.cz/synapse/
It's very complete and easy to use. It's portable and it's all pascal. Delphi, FPC and other systems supported.
Also, i've used SDL_Net and it's very very easy to use. I suggest it if you want something up and running in short time.

bye