socket.io-session-middleware0.1.0 • Public • Published
Share connect/express sessions with socket.io 1.x
var socketSession = ;var session =store:secret: "secret"key: "mykey.sid"cookieParser: connect;io;io;
socket;socket;//=> I am hans
A full featured example can be found in the example folder.
Make sure to fire a http request to initialize the session/cookie before accessing the session with socket.io. If you are serving the socket.io client with your node.js server this won't be a problem for you.