introducing socket support

Why not supporting sockets?
The small overhead of TCP could be avoided using sockets.

This Pullrequest working in my case...