Client library for SockJS (Websocket)

npm install sockjs-client-ws
9 downloads in the last day
522 downloads in the last week
3 285 downloads in the last month

SockJS Client Node

Node client for SockJS. Currently, only the WebSocket transport is supported.


var sjsc = require('sockjs-client-ws');
var client = sjsc.create("http://localhost/sjsServer");
client.on('connection', function () { // connection is established });
client.on('data', function (msg) { // received some data });
client.on('error', function (e) { // something went wrong });
client.write("Have some text you mighty SockJS server!");
npm loves you