A namespace for opening WebSockets in ClojureScript.
A namespace for opening WebSockets in ClojureScript.
(close stream)
Close a stream opened by connect.
Close a stream opened by connect.
(connect url)
(connect url options)
Create a WebSocket to the specified URL, and returns a 'stream' map of four keys:
:socket - contains the WebSocket object :close-status - a promise channel that contains the final close status :source - a core.async channel to read from :sink - a core.async channel to write to
Takes the following options:
:format - a formatter from haslett.format :source - a custom channel to use as the source :sink - a custom channel to use as the sink :protocols - passed to the WebSocket, a vector of protocol strings :binary-type - passed to the WebSocket, may be :blob or :arraybuffer
Create a WebSocket to the specified URL, and returns a 'stream' map of four keys: :socket - contains the WebSocket object :close-status - a promise channel that contains the final close status :source - a core.async channel to read from :sink - a core.async channel to write to Takes the following options: :format - a formatter from haslett.format :source - a custom channel to use as the source :sink - a custom channel to use as the sink :protocols - passed to the WebSocket, a vector of protocol strings :binary-type - passed to the WebSocket, may be :blob or :arraybuffer
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close