Automattic/socket.io — pull request #1921 by dylanlingelbach (2014-12-19 19:29:56+00:00)
Title: Support dynamic namespaces

This is another attempt to fix #1854. It is much more limited in its approach (no automatic disconnects and no host support - as in #1865).

I'm new to the code base so not sure if this is the right approach - open to feedback on how I'm doing this. The questions I have with my approach:
- Does it make sense to set up another middleware path for this? Or should I allow unknown namespaces to flow through to the existing middleware path and then tear down the connection if the namespace isn't found (or is disallowed)
- Should I pass more than just the name of the namespace to give the server more discretion in allowing the new namespace?
- Is there a better name than `useNamespace` for adding the middleware? Name feels odd but couldn't think of anything better.

Thanks to @davidbau for #1865 which got me going in the right direction.