title: How to identify users in socket.io?
body: <p>I'm using socket.io to build a chat application. But I don't know how to identify which user sent this message. There is no "req" (request) variable, as there is in Express. So how would I safely identify the sender in this case?</p>
  
  <pre><code>socket.on('chatroom message ', function(msg){
          console.log("sending msg: "+msg);
          io.emit('chatroom message ', msg);
      });
  </code></pre>