title: Update all clients using Socket.io?
body: <p>Is it possible to force all clients to update using socket.io? I've tried the following, but it doesn't seem to update other clients when a new client connects:</p>
  
  <h2>Serverside JavaScript:</h2>
  
  <p>I'm attempting to send a message to all clients, which contains the current number of connected users, it correctly sends the amount of users.... however the client itself doesn't seem to update until the page has been refreshed. I want this to happen is realtime.</p>
  
  <pre><code>var clients = 0;
  io.sockets.on('connection', function (socket) {
    ++clients;
    socket.emit('users_count', clients);    
    socket.on('disconnect', function () {
      --clients;
    });
  });
  </code></pre>
  
  <h2>Clientside JavaScript:</h2>
  
  <pre><code>var socket = io.connect('http://localhost');
  
  socket.on('connect', function(){
    socket.on('users_count', function(data){
      $('#client_count').text(data);
      console.log("Connection");
    });
  });
  </code></pre>