WCS icon indicating copy to clipboard operation
WCS copied to clipboard

An Asynchronous WebSocket Client Library for Scala

wCS: An Asynchronous WebSocket Client Library for Scala.

A really simple WebSocket library that works with node.js, Atmosphere or any WebSocket server! As simply as

     WebSocket().open("ws://localhost")
        .listener(new TextListener {
            override def onMessage(message: String) {
                // Do something
            }
        })
        .send("Hello World")
        .send("WebSockets are cool!")
        .listener(new BinaryListener {
            override def onMessage(message: Array[Byte]) {
                // Do something
            }
        })
        .send("Hello World".getBytes)

Download using Maven

     <dependency>
         <groupId>org.jfarcand</groupId>
         <artifactId>wcs</artifactId>
         <version>1.4</version>
      </dependency>

or a single artifact that contains all its dependencies

     <dependency>
         <groupId>org.jfarcand</groupId>
         <artifactId>wcs-all</artifactId>
         <version>1.4</version>
      </dependency>