Has anyone successfully implemented a dynamic namespace in node/socket.io?

Meaning: A user auth's to an application -> application sets the namespace of the socket.io connection (http://www.socketioserver.com/NAMESPACE) and the node server responds accordingly without being hard-coded for that particular namespace. to that particular namespace.

The purpose is therefore to write one piece of server-side node code that responds to requests for a particular namespace with the appropriate data for that namespace without knowing what namespace is going to connect from the client before hand.

Yes you can do this pretty easily. You'll just need to perform some kind of a handshake (eg. send a message on the default ns with something used to identify the requested ns) beforehand, so that the socketio code knows what namespace it needs to listen on.

You can then just use sio.of(namespaceFromHandshake).on...