You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any interest in me implementing the ring websocket protocol. We could make a ring handler triggered by the upgrade handler. The ring handler would map HttpPrologue and Headers to a ring request and the response would expect a :ring.websocket/listener and optional headers for the upgrade negotiation. This would be more consistent and ergonomic of Clojure users. The trade off it it would require a mutable object implementing WsListener that would wrap and dispatch to :ring.websocket/listener which would be strickly more overhead for the stateless websocket use case. I expect the stateless websockets use case to be rare in the real world . Another benefit is the handler could also be used to reject unauthorized requests by not returning a listener. When a listener is not returned hirundo could throw a WsUpgradeException. One other note is because there is a handler returns a listener could close over state that would also resolve #23
The text was updated successfully, but these errors were encountered:
Any interest in me implementing the ring websocket protocol. We could make a ring handler triggered by the upgrade handler. The ring handler would map
HttpPrologue
andHeaders
to a ring request and the response would expect a:ring.websocket/listener
and optional headers for the upgrade negotiation. This would be more consistent and ergonomic of Clojure users. The trade off it it would require a mutable object implementingWsListener
that would wrap and dispatch to:ring.websocket/listener
which would be strickly more overhead for the stateless websocket use case. I expect the stateless websockets use case to be rare in the real world . Another benefit is the handler could also be used to reject unauthorized requests by not returning a listener. When a listener is not returned hirundo could throw aWsUpgradeException
. One other note is because there is a handler returns a listener could close over state that would also resolve #23The text was updated successfully, but these errors were encountered: