client cannot connect to non-existing namespaces#1688
Conversation
|
This would be very useful. I'd love to be able to create nsps on the server after some authentication mechanism. Then, the client can only connect to that specific nsp. If they connect to the default nsp, they are automatically disconnected. |
client cannot connect to non-existing namespaces
|
This PR requires that the server create its namespaces upfront, prior to any client connecting to that namespace. In my case this isn't desired behavior. I want to allocate namespaces dynamically on the server and client and have messages flow between them whenever the namespace exists on both the client and the server. As far as I can tell my clients don't receive an event when the namespace is created on the server to allow me to force a reconnect on the client side to pick up the newly created namespace. Is creating my namespaces upfront on the server the only way to go? I'm not sure if my question is the same as #1854. In any case could the docs at http://socket.io/docs/rooms-and-namespaces/ get updated to point out the namespace must be created on the server prior to a client trying to connect to it? I'm happy to make the edit to the docs and submit a PR - I couldn't find where they live in GitHub. Having that in the docs would have saved me several hours of debugging time. |
|
At the moment it is. We should make it so that the server can specify a custom handler for namespace creation so that they can be created dynamically |
|
Added PR #1921 as an attempt at handling dynamic namespaces. Thanks! |
Namespaces should be allocated only by the server using
ofA client cannot connect to a namespace not allocated by the server.
Please check it @guille
Thanks @smaffer
#1681