Closed niwinz closed 9 years ago
Hi,
Thanks for the suggestion.
If you check the history of the commits it used to work like this, but I changed it in favor for a similar approach to the ring server adapters out there: having a main handler and leaving routing choice the end user. The way it works now you can define your routing with compojure, clout, or any routing lib. I am not sure I'd want to go back on this unless you have a compeling argument in favor of it.
Hmm, I'm really like the two approaches, but in case of websockets I certainly prefer one handler one url due the nature of websocket handlers. But, obviously, I don't have compelling argument for convince to change.
As I said previously, this pr is only a purpose, the current approach is also a good point. Thank you again!
Hi!
Currently, jet only supports one unique websocket handler, and would be awesome having a more flexible way to set multiple websocket handlers.
With approach implemented in this pr, allows set different websocket handlers in different paths. Obviously, this pr is "unfinished", because I want to ask you if you would include this change. In affirmative case, I will update pr with docs.
Additionally, supporting two ways to setup websocket handler may be confusing, and it has different approaches to manage this situation:
:websocket-handler handler
is just alias for:websockets {"/" handler}
and the last one has the priority..:websocket-handler
option and document it on the readme.Thank you for the really fantastic package.