Provide a wrap-electric-websocket
HTTPKit compatible middleware, starting and
managing an Electric Server. This is a variant of
hyperfiddle.electric-ring-adapter
made compatible with HTTPKit.
Provide a `wrap-electric-websocket` HTTPKit compatible middleware, starting and managing an Electric Server. This is a variant of `hyperfiddle.electric-ring-adapter` made compatible with HTTPKit.
(httpkit-ws-handler ring-req boot-fn)
Return a map of HTTPkit-compatible handlers, describing how to start and manage an Electric server process, hooked onto a websocket.
Return a map of HTTPkit-compatible handlers, describing how to start and manage an Electric server process, hooked onto a websocket.
(reject-websocket-handler code reason)
Will accept socket connection upgrade and immediately close the socket on
connection, with given code
and reason
. Use this to cleanly reject a
websocket connection.
Will accept socket connection upgrade and immediately close the socket on connection, with given `code` and `reason`. Use this to cleanly reject a websocket connection.
Map HTTPKit custom WS status names to the actual RFC-defined status code, if it can be mapped. Fully qualify the status name otherwise.
Map HTTPKit custom WS status names to the actual RFC-defined status code, if it can be mapped. Fully qualify the status name otherwise.
(wrap-electric-websocket next-handler electric-boot-fn)
An HTTPKit-compatible ring middleware, starting an Electric server program defined by electric-boot-fn
on websocket connection.
E.g.: ```
(-> ring-handler
(wrap-electric-websocket (fn [ring-req] (e/boot-server {} my-ns/MyElectricDefn ring-req)))
(wrap-cookies)
(wrap-params)
)
An HTTPKit-compatible ring middleware, starting an Electric server program defined by `electric-boot-fn` on websocket connection. E.g.: ``` (-> ring-handler (wrap-electric-websocket (fn [ring-req] (e/boot-server {} my-ns/MyElectricDefn ring-req))) (wrap-cookies) (wrap-params) ) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close