Clojure WebSocket Client

client, clojure, websocket

Solution

aleph has support for websockets on both server and client. It can take some time to get used to the asynchronous style and aleph's core abstractions, but it's a very good tool once you get the hang of it.

Problem

I have set up a WebSocket server using http-kit that should accept web socket connections. It is the basic example shown in the http-kit documentation. The question is: How do you create a Clojure client that connects to it? The client can be any Clojure http library, I don't really mind. I already know about Javascript clients, and I believe that Java has an API that I could use from Clojure. But what I am looking for is a Clojure library that supports websockets both for client and server. I saw nothing in http-kit code that would make it easy.

Original source