(client url)
(client url
{:keys [headers method params] :or {headers {} method :put params {}}})
Creates a new client instance from socket.
Creates a new client instance from socket.
(client? client)
Return true if a privided client is instance of Client type.
Return true if a privided client is instance of Client type.
(novelty client dest)
(novelty client dest data)
(novelty client dest data opts)
Sends a novelty message to a server.
Sends a novelty message to a server.
(query client dest)
(query client dest data)
(query client dest data opts)
Sends a query message to a server.
Sends a query message to a server.
(reset-headers! c headers)
Reset the headers on the client instance.
Reset the headers on the client instance.
(socket client dest)
(socket client dest data)
(socket client dest data {:keys [params _type] :or {params {} _type :socket}})
Sends a :socket frame to the server and opens bi-direction websocket connection.
This function returns a vector of two streams, first for input messages and second for output.
You can close the socket just ending the output stream.
Sends a :socket frame to the server and opens bi-direction websocket connection. This function returns a vector of two streams, first for input messages and second for output. You can close the socket just ending the output stream.
(subscribe client dest)
(subscribe client dest data)
(subscribe client dest data {:keys [params] :or {params {}} :as opts})
Sends a :subscribe frame to the server and open an uni-directional websocket connection.
This function returns one stream for read messages from backend. You can close the subscription sockets just ending the stream.
Sends a :subscribe frame to the server and open an uni-directional websocket connection. This function returns one stream for read messages from backend. You can close the subscription sockets just ending the stream.
(update-headers! c headers)
Update the headers on the client instance.
Update the headers on the client instance.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close