Skip to content

brainoutsource/clojure-websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clojure-websocket

Clojars Project

A clojure wrapper for TooTallNate/Java-WebSocket which is 100% Jetty-free.

Usage

(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")

License

Copyright © 2018 Alexander Eliseyev

Distributed under the Eclipse Public License, the same as Clojure.

About

Jetty-free Clojure websocket client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published