title: How to access session object in socket.io connection
body: <p>I'm using express-session, and I set the session object on a login page.  That all works fine.  My socket.io connections aren't initiated and used until further into the site. Reading the socket.io documentation it mentions that you can access the <code>request</code> object that initiated the socket connection. This doesn't seem to be same as the express-session object viz: </p>
  
  <pre><code>io.on("connection", function (socket) {
      console.log(socket.request.session)
  });
  </code></pre>
  
  <p>outputs <code>undefined</code>.  There is a <code>request</code> object viz: <code>console.log(socket.request)</code> outputs <code>[object Object]</code>.</p>
  
  <p>Is there a way to access the express-session session object (that was set on a previous page before the socket connection was made) through a socket.io connection?</p>