When building a WebSocket-based application using express.js and socket.io, one of the main problems to resolve is how to go about connecting express' session management with that of socket.io.
Prior to socket.io 0.7, there were a few different hacks that could be used, but that release fortunately brought a saner approach to the table. Daniel Baulig wrote a very thorough blog post that discusses exactly this issue, with detailed code snippets showing precisely the steps that are required.
It was a big help for me getting session management working in socket.io this weekend, so I recommend anyone else that needs to deal with the same issue gives it a read.
http://www.danielbaulig.de/socket-ioexpress