A clojure wrapper for TooTallNate/Java-WebSocket which is 100% Jetty-free.
(def client (connect "wss://some-service/"
:on-open (fn [client handshake] (println "Open"))
:on-message (fn [msg] (println (str "Message: " msg))
:on-close (fn [code reason by-server] (println (str "Closed: " code "," reason "," by-server)))
:on-error (fn [ex] (clojure.stacktrace/print-stack-trace ex)))))
(send-msg client "some-message")
Copyright © 2018 Alexander Eliseyev
Distributed under the Eclipse Public License, the same as Clojure.