sunng87 / ring-jetty9-adapter

An enhanced version of jetty adapter for ring, with additional features like websockets, http/2 and http/3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No request-map or session context passed to Websocket functions

NoamB opened this issue · comments

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).

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

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).