LearnBoost/socket.io — Issue #673: io.sockets.emit not working with namespaces
Author: Xunnamius
Created: 2011-12-01 03:38:38+00:00
State: open

Inside of my namespace, I have need to emit an event to everyone connected to the server (on all namespaces), including the socket that wants to send the data.

In the examples, it seems io.sockets.emit(...); does something, but in my code, it is doing nothing. Only emitting through each namespace individually seems to work.

A code snippet is below:

```javascript
admins.on('connection', function(socket)
{
var g = socket.handshake.g;

socket.on('phase shift', function(phase)
{
G.phaseShift(phase, g.username, function()
{
io.sockets.emit('hard refresh', function(){ console.log('working?'); }); // does not work, even though the ack function is called
// admins.emit('hard refresh'); // works perfectly fine
});
});
. . .
```

(Also, what is this io.sockets.clients() all about? I see no documentation on it)