Q:

Socket.io how to check a client's cookie data? 

I am building a to do list app, where several users can log onto the same list and view the items update in realtime - Google Docs style.  I am using NodeJS, Express, Socket.io for the instant updates, and the client-sessions NodeJS module to store cookies to allow users to remain logged in.  
I can load the correct items on the page with Express by rendering a Jade template, populating it with the items associated with the cookie on the requesting client, by creating a cookie under req.session.user with the user's details.  However this only works when I have a req to get the session from, as in app.get('/', function(req, res){});.  
However when I want to livestream the edits via socket.io, how can I make sure that the items edited are linked to the correct list?  Is there any way of ascertaining what cookies the socket client has on the server?  
I don't want to simply store a variable with the client's ID on the browser, because this will then be vulnerable, and won't take advantage of client-sessions's built in encryption.  

A:

Review socket.io/docs/server-api 
client.request will help you retrieve them. 
If you look at the code for client-sessions (client-sessions.js), it exports the decode function.  session.decode({'cookieName':'name'}, cookie_content); 

