Liking cljdoc? Tell your friends :D

ws-edn adds a little abstraction to websocket

Usage

Clojars Project

[mvc-works/ws-edn "0.1.0-a1"]

(ws-edn.server/start-server!
   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.client/connect!
   "ws://localhost:5001"
   {:on-open! (fn [event] (println "open")),
    :on-data! (fn [data] (println "data" data)),
    :on-close! (fn [event] (println "close"))})

License

MIT

Can you improve this documentation?Edit on GitHub

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

× close