socket.io - how to broadcast messages on a namespace?
According to socket.io examples: To broadcast, simply add a broadcast flag to emit and send method calls. Broadcasting means sending a message to everyone else except for the socket that starts it. var io = require('socket.io').listen(80); io.sockets.on('connection', function (socket) { socket.broadcast.emit('user connected'); }); I tried to combine this with the new socket.io namsepace feature, so I got this: var chat = ioserver.of('/chat'); chat.on('connection', function (socket) { console.log('chat connection'); socket.on('message', function (msg) { console.log(msg); chat.send(msg); }); });