On April 21st I pushed the ScalaWebSocket library to GitHub. But what is it? As the name suggests, it’s WebSockets for Scala.
There are already a few implementations of WebSocket for Java, there is also the Scala project called wCS but all of them support Javaish style of passing the anonymous implementations of some kind of Listener interface. I didn’t want that as I prefer the functional style of handlers.
ScalaWebSocket is a thin wrapper around async-http-client and it exposes a more Scala-like vocabulary to interact with WebSockets.
To start using it in your project
1 2 3 4 5
Usage of this library is very simple.
1 2 3
I need this library to talk to SocketIO servers, so in version 0.2.0 I will implement some basic support for SocketIO. For now, please use it and report any issues you have. My goal for this library is to make WebSocket natural in Scala.