No request-map or session context passed to Websocket functions
NoamB opened this issue · comments
Noam Ben Ari commented
Hi,
How do you know which user sent the text or binary message? Currently I see no request-map or session map passed into on-text and on-bytes (or any other WS function).
Ning Sun commented
From 0.9, you can retrieve the request map from ws with (req-of ws)
. But it only contains base Ring request map without session information.
https://github.com/sunng87/ring-jetty9-adapter/blob/master/src/ring/adapter/jetty9/websocket.clj#L59
Noam Ben Ari commented
Thanks,
I think I can work with this (i.e. pass the result of (req-of ws) into my middleware stack to get the session again).