title: Adding a cookie value on Socket.IO
body: <p>How to add a cookie value on Socket.IO?</p>
  
  <pre><code>io.sockets.on('connection', function (client)
  { 
      console.log(client.id); 
      client.handshake.headers.cookie.socketID = client.id;   // not work
   // client.handshake.headers.cookie("socketID",client.id);  //crash
  
      console.log(client.handshake.headers.cookie);
  // The current output is:
  //connect.sid=tI21xumy3u2n4QXO1GljmPAf.pzFQ1Xu%2B6bz36secu4VSCdSNU8PT1L44gQZ4kFUFQqQ
  //this is express session id, and I also want to add client.id of Socket.IO. 
  
  //...........
  }
  </code></pre>
  
  <p>I have read 
  <a href="http://www.danielbaulig.de/socket-ioexpress/" rel="noreferrer">http://www.danielbaulig.de/socket-ioexpress/</a>
  , but I do not need session management on node.js, but just need to add a socket.io client ID value in cookie as connect.sid does.</p>