Liking cljdoc? Tell your friends :D

hyperfiddle.electric-httpkit-adapter3

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.
raw docstring

httpkit-ws-handlerclj

(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.
sourceraw docstring

reject-websocket-handlerclj

(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.
sourceraw docstring

STATUS-CODEclj

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.
sourceraw docstring

wrap-electric-websocketclj

(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)
  )
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close