I'm looking for some help figuring out sessions on a server that relies on express and socket.io. Mostly the goal is handling things like pairing socket.io session ids with user ids, maintaing state on reconnects, and being able to easily group any actors on the server.
Any help is very much appreciated.
Thanks.
I've just uploaded a project which allows you to use your sessions from express in Socket.IO. Maybe this can be of some help to you. https://github.com/aviddiviner/Socket.IO-sessions
You can install it with npm install socket.io-sessions
. Be sure to check out the README.
If you're new to Node, I would suggest spending some time reading through the express docs on how they handle sessions as well. http://expressjs.com/guide.html#session-support
Lastly, I've also posted some code snippets here: socket.io and session?
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With