Skip to content
3rd-Eden edited this page Jun 29, 2011 · 12 revisions

#Message flags

Message flags are used to indicate how we should send the event or message to the user. These flags can be chained together without any particular order.

Available flags

broadcast

Sends the message or event to every connected user in the current namespace namespace, except to your self.

var io = require('socket.io').listen(80);
io.of('/namespace').on('connection', function (socket) {
  socket.broadcast.send('Hi, a new user connected');
});

Clone this wiki locally