Joining socket io room on connect
<p>I am trying to make a logged in user to join a certain socket.io room on connect. 
According to any examples I found on the net I seem to have emit some action from client to be able to join some room. 
Something like: </p>

<pre><code>socket.on('connect', function() {
   socket.emit('join', 'room1');
});
</code></pre>

<p>Server.js:</p>

<pre><code>io.sockets.on('connection', function(socket) {
    socket.on('join', function(room) {
        socket.join(room);
    });
});
</code></pre>

<p>And according to most tutorials it should work.</p>

<p>What I am thinkin to do is to:</p>

<pre><code>socket.on('connect', function() {
   socket.join('room1');
});
</code></pre>

<p>But It does not seem to work as whatever msg I emit from server are not caught on client. Any idea, what am I doing wrong? Is it possible in general?</p>