A server-sent events connection, registered like a WebSocket so the bus
delivers to it. send-message queues the message; the streaming response
body drains and renders it on its own thread, off the bus.
A server-sent events connection, registered like a WebSocket so the bus delivers to it. `send-message` queues the message; the streaming response body drains and renders it on its own thread, off the bus.
(create-sse-connection connection-id t-fn & {:keys [queue-size]})t-fn translates [:t ...] markers in pushed fragments; nil renders keys.
`t-fn` translates [:t ...] markers in pushed fragments; nil renders keys.
(next-event {:keys [connection-id queue open-state t-fn]} timeout-ms)The next queued event as SSE text, nil after timeout-ms with nothing
queued (or when it fails to render), or ::closed once the connection is closed.
The next queued event as SSE text, nil after `timeout-ms` with nothing queued (or when it fails to render), or ::closed once the connection is closed.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |