use socket.io-browserify

This commit is contained in:
Manuel Araoz 2014-08-07 18:53:02 -03:00
parent 9d066f6d71
commit df9b15002f
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ module.exports.init = function(io_ext, config) {
if (ios) {
// when a new socket connects
ios.sockets.on('connection', function(socket) {
console.log("New connection from " + socket.request.connection.remoteAddress + ":" + socket.request.connection.remotePort);
// when it subscribes, make it join the according room
socket.on('subscribe', function(topic) {
if (socket.rooms.length === 1) {