Add stephan48's code
Looks like this works now.
Merge pull request #1 from warewolf/add-tcp-server

Add tcp server