Open ikitommi opened 5 years ago
Here's a starting point: https://github.com/plexus/procflow/blob/master/src/procflow/http/websocket.clj
It assumes you're using reitit like this
["/ws" {:websocket {:on-connect procflow.http/on-connect :on-receive procflow.http/on-receive :on-close procflow.http/on-close :on-error procflow.http/on-error}}]
Not optimized at all, probably still has serious bugs, and contains some obvious inefficiencies (e.g. it will match all non-websocket routes twice), but like I said it's a starting point.
Here's a starting point: https://github.com/plexus/procflow/blob/master/src/procflow/http/websocket.clj
It assumes you're using reitit like this
Not optimized at all, probably still has serious bugs, and contains some obvious inefficiencies (e.g. it will match all non-websocket routes twice), but like I said it's a starting point.