socket.io: How to emit an Array and a Variable simultaneously
<p>Learning Node.js, Express.js and Socket.io.</p>

<p>Made a Chat an it works so far.</p>

<p>Now I would like to emit to the Client, that a user has entered or left the chat by emiting a variable that indicates that...</p>

<p>Ist that possible?</p>

<p>So something like this:</p>

<p>Server.js</p>

<pre><code>var users = [];
var inout;
function updateUsers(){
    io.emit('users', users, 'inout', inout);
}
</code></pre>

<p>Client:</p>

<pre><code>var socket = io.connect( 'http://'+window.location.hostname+':3000' );
    socket.on('users', function(data){

// how to get the 'inout' here? }
</code></pre>

<p>Thanks for any Help... ;)</p>