Live context
Live context
(connection-handler
uri
&
{:keys [implementation] :or {implementation :http-kit} :as options})
Create a handler that initiates WebSocket (or SSE) connection with ripley server and browser.
Options:
:implementation the name of the server implementation to use (defaults to :http-kit)
will call ripley.live.impl.<implementation>/handler
to create the handler
:ping-interval Ping interval seconds. If specified, send ping message to client periodically.
This can facilitate keeping alive connections when load balancers have some
idle timeout.
See other server implementation ns for possible other options.
Create a handler that initiates WebSocket (or SSE) connection with ripley server and browser. Options: :implementation the name of the server implementation to use (defaults to :http-kit) will call `ripley.live.impl.<implementation>/handler` to create the handler :ping-interval Ping interval seconds. If specified, send ping message to client periodically. This can facilitate keeping alive connections when load balancers have some idle timeout. See other server implementation ns for possible other options.
(initial-context-state)
Return initial state for a new context
Return initial state for a new context
(initialize-connection {:keys [ping-interval]} context-id send!)
Initialize a connection for the given live context id and send function. The [[send!]] function must have arity of 1 that takes a (String) data to send to the client.
If no context for the given id exists, throws an exception.
Returns an instance of Callbacks which the caller must configure on the underlying connection.
Initialize a connection for the given live context id and send function. The [[send!]] function must have arity of 1 that takes a (String) data to send to the client. If no context for the given id exists, throws an exception. Returns an instance of Callbacks which the caller must configure on the underlying connection.
(render-with-context render-fn)
(render-with-context render-fn
{:keys [bindings] :or {bindings #{}} :as _context-options})
Return input stream that calls render-fn with a new live context bound.
Return input stream that calls render-fn with a new live context bound.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close