如何使用 Retrofit + RX 实现 WebSocket

How to implement a WebSocket with Retrofit + RX

我有一个使用 Retrofit with Rx 的项目结构。

我想用它来实现 WebSocket 通信,知道如何实现吗?

Retrofit 尚不支持网络套接字。该功能预计将出现在 2.1 版本中。但是,JW 一直在开发一个分支。您可以在 Github.

上从 his branch and try it. Or can wait till the 2.1 release. This is the corresponding issue 构建 Retrofit