Wisembly/elephant.io — pull request #31 by j-norwood-young (2013-11-20 08:24:08+00:00)
Title: Support for namespaces

This update lets you set a namespace for your connection. You can then do something like this on your Socket.io server:

var socketio = require('socket.io');
var http = require('http');

var namespace = "/mynamespace";

var server = http.createServer().listen(config.port, function() {
console.log("Server started, listening at " + config.port + " on namespace " + namespace);
});

var io = socketio.listen(server);

var api = io
.of(namespace)
.on('connection', function(socket) {
....