[mvc-works/ws-edn "0.1.0-a2"]
(ws-edn.server/wss-serve!
5001
{:on-open! (fn [sid socket] (println "opened" sid)),
:on-data! (fn [sid data] (println "data" sid data)),
:on-close! (fn [sid event] (println "close" sid))})
(ws-edn.server/wss-send! sid data)
(ws-edn.client/ws-connect!
"ws://localhost:5001"
{:on-open! (fn [event] (println "open")),
:on-data! (fn [data] (println "data" data)),
:on-close! (fn [event] (println "close"))})
(ws-edn.client/ws-send! data)
MIT
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close