Open Metalaka opened 10 years ago
Hello :-),
Would it help to implement sub-protocols in WebSocket (https://github.com/hoaproject/Websocket/blob/10747c1e5fe1eadff8f9c53ef3614cc911a401cf/Protocol/Rfc6455.php#L117-L118)? If yes, it would be an elegant way to do that. I like the idea.
I thought to some thing like this when I opened the issue.
But, can you explain your thought ? I don't understand what you would like to do.
WebSocket defines the availibity of embedding protocols inside messages (I call them subprotocols). We can see them as extensions. An example: http://wamp.ws/.
A protocol is a just a router + a dispatcher + nice controllers. In the case of WebSocket and subprotocols, we could have a generic router (as you proposed) and one router per protocol that just fires events (or something like that). I am thinking since several months of an elegant way to implement subprotocols but using the router is a nice idea.
Thoughts?
Ok, it's clearer. I like the idea. I wait with impatience for the first drafts.
I don't know if it is even possible. Do you want to try?
I've no idea of how to do that, so I prefer wait :)
Ok. It will require a lot of time so I am not sure to do that right now.
It could be cool to be able to use
Hoa\router
in a WebSocket context like in Http context.Some behaviour differ like
Router::getURI()
and the way to return data, so there is some of work here.thoughts?