SockJS client for Node
Latest commit a9cdc46 Apr 24, 2015 @brycekahle brycekahle Merge pull request #3 from mbrevoort/master
Add MIT LICENSE file, package.json property


The sockjs-client project now supports running in node, and supports more transports than this project does. I strongly encourage you to use that instead.

SockJS Client Node

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


var sjsc = require('sockjs-client');
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!");