added support for socket namespacing and client options