sockjs/sockjs-node — pull request #64 by igorw (2012-05-12 17:25:34+00:00)
Title: Convert sockjs.listen to http_server option of sockjs.Server

Listen is quite a confusing name, since it has nothing to do with http.Server.listen.

Usage:

var http = require('http'),
sockjs = require('sockjs');

var server = http.createServer();

var echo = sockjs.createServer({
prefix: '/foo',
http_server: server
});
echo.on('connection', function (conn) {
conn.on('data', function (message) {
conn.write(message);
});
});

server.listen(9999);