Development code for Sockets provider

- This is an incremental devel code for Sockets provider.

Please try to declare all variables at the top of functions.  It makes finding a variable declaration much easier.