EmberSockets icon indicating copy to clipboard operation
EmberSockets copied to clipboard

Dynamic path

Open seifsallam opened this issue 10 years ago • 6 comments

Is it possible to set path from controller/route for creating dynamic rooms?

seifsallam avatar Jul 09 '14 13:07 seifsallam

Setting up a room on Socket.io is done from the server side, so from the client emit an event with the room name in the payload, and then listen for the event on server side, creating the appropriate room for the client.

Wildhoney avatar Jul 09 '14 13:07 Wildhoney

Sorry, I meant to say namespaces

seifsallam avatar Jul 09 '14 13:07 seifsallam

Dynamic namespaces?

Wildhoney avatar Jul 09 '14 13:07 Wildhoney

Yes. Like having a namespace for /analytics and another for /chat

seifsallam avatar Jul 09 '14 14:07 seifsallam

Ah! No, currently no support for namespaces, but we could add it. How do you imagine we'd implement this? Adding a namespace parameter in the bootstrap? Since the Socket.io client would need to initially connect to that namespace.

Wildhoney avatar Jul 09 '14 14:07 Wildhoney

I think currently path works as namespace. I was thinking maybe providing a hook for overriding the path value in a specific controller/route. I'm not sure how can this be implemented though.

seifsallam avatar Jul 09 '14 14:07 seifsallam