Liking cljdoc? Tell your friends :D
ClojureScript only.

cljs-websockets-async.core


connect!cljs

(connect! uri)
(connect! uri {:keys [in out] :or {in chan out chan}})

Connects to a websocket. Options: :in - a fn called w/ no arguments to obtain a core.async channel for input (optional, default: cljs.core.async/chan) :out - a fn called w/ no arguments to obtain a core.async channel for output (optional, default: cljs.core.async/chan)

Returns a channel that, when connected, puts a map with with keys, :ws - Raw Websocket object :in - Channel to write values to socket on :out - Channel to recieve socket data on

Connects to a websocket.
Options:
:in  - a fn called w/ no arguments to obtain a core.async channel for input (optional, default: cljs.core.async/chan)
:out - a fn called w/ no arguments to obtain a core.async channel for output (optional, default: cljs.core.async/chan)

Returns a channel that, when connected, puts a map with with keys,
:ws  - Raw Websocket object
:in  - Channel to write values to socket on
:out - Channel to recieve socket data on
sourceraw docstring

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

× close