Liking cljdoc? Tell your friends :D

ring.sse


COMMENT_FIELDclj

source

CRLFclj

source

DATA_FIELDclj

source

event-channel-handlerclj

(event-channel-handler stream-ready-fn)
(event-channel-handler stream-ready-fn
                       {:keys [buffer heartbeat-delay on-client-disconnect]})

Returns a Ring async handler which will start a Server Sent Event stream with the requesting client. stream-ready-fn will be called in a future, and will be passed the original request, the initial response, the raise fn, and the event channel.

Options:

:buffer - either an integer buffer size, or a 0-arity function that returns a buffer. :heartbeat-delay - An integer number of seconds between heartbeat messages :on-client-disconnect - A function of one argument (the initial response) which will be called when the client permanently disconnects.

Returns a Ring async handler which will start a Server Sent Event
stream with the requesting client. `stream-ready-fn` will be called
in a future, and will be passed the original request, the initial
response, the raise fn, and the event channel.

Options:

:buffer - either an integer buffer size, or a 0-arity function that
  returns a buffer.
:heartbeat-delay - An integer number of seconds between heartbeat
  messages
:on-client-disconnect - A function of one argument (the initial response)
  which will be called when the client permanently disconnects.
sourceraw docstring

EVENT_FIELDclj

source

ID_FIELDclj

source

mk-dataclj

(mk-data name data)
(mk-data name data id)
source

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

× close