(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close