title: How can I get (Express's) sessionID for a websocket connection
body: <p>I'm using WebSockets <code>npm install ws</code> on the same port as Express is running.</p>
  
  <p>I'd like to pick up the associated 'sessionID' from the HTTP connection which had just been made and upgraded to a WebSocket.</p>
  
  <pre><code>// start express listening
  server.listen(conf.server.port, conf.server.host);
  
  var WebSocketServer = require('ws').Server
    , wss = new WebSocketServer({server: server});
  
  wss.on('connection', function(ws) {
      var sessionID = // how do I get this?
      ws.on('message', function(message) {
          console.log('received: %s', message);
      });
      ws.send('something');
  });
  </code></pre>
  
  <p>How can this be done?</p>
  
  <p>(I currently work around the issue by sending the sessionID in the page, but this is ugly.)</p>