I think I'll have to agree with dj_sharp on that one - synapse and TCP are probably the best way forwards. I've personally played with a few ideas for a data client & server system for use in games and other projects. What worked best for me was to standardize like crazy. And I laid it out like this (first is lowest level, application stuff at the bottom of the list)
-Common, standard protocol
-Standard network functions (ie. we send blocks/strings/stuff so that the recieveing command knows what to expect)
-Protocol encoder (converts the data from the application into packets)
-Backend (client interface for the client / core server code for the server [think connection management, authorization, protocol negotiation and so on])
-Custom code.

As for testing, I run the server on my machine and connect to 127.0.0.1 as dj_sharp suggested. Synapse has some pretty good documentation, but I found the examples most useful IMHO. All that said - I once tried to do all that directly on top of sockets and although I did get it working in the end it was EXTREMELY unreliable and just not nice to use.

Edit: If you'd like I can PM you the relevant files out of a project of mine (its not open source code yet for a whole bunch of reasons) which is what I use in our ground control software that uses synapse. It isnt the best way to do things but is serviceable.