Clojure WebSocket客户端 [英] Clojure WebSocket Client

查看:137
本文介绍了Clojure WebSocket客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用http-kit设置了一个WebSocket服务器,它应该接受Web套接字连接。这是http-kit文档中显示的基本示例。

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.

问题是:
如何创建Clojure客户端连接到它?

The question is: How do you create a Clojure client that connects to it?

客户端可以是任何Clojure http库,我不介意。我已经知道Javascript客户端,我相信Java有一个API,我可以使用从Clojure。但是我要找的是一个Clojure库,它支持两个客户端服务器的websockets。我在http-kit代码中看不到任何可以使它容易的内容。

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.

推荐答案

aleph 支持服务器和客户端上的websockets。它可能需要一些时间来习惯异步风格和aleph的核心抽象,但它是一个非常好的工具,一旦你得到它的悬念。

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.

这篇关于Clojure WebSocket客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆