How might one go about accessing a session value inside of a socket.io instance?
See original GitHub issueQuestion is in the title, just wondering if there is a function like session.getSesh(seshid).userid
or something
Issue Analytics
- State:
- Created 8 years ago
- Comments:8
Top Results From Across the Web
The Socket instance (server-side)
A Socket is the fundamental class for interacting with the client. It inherits all the methods of the Node.js EventEmitter, like emit, on, ......
Read more >socket.io and session? - node.js - Stack Overflow
To make it work, in the express/connect side, I explicitly define the session store so I can use it inside socket: MemoryStore =...
Read more >The Importance of Documentation or “How i discovered how to ...
socket.request.session // Now it's available from Socket.IO sockets too! Win! }); The preceding 2 steps are the elements for the ...
Read more >Flask-SocketIO and the User Session - miguelgrinberg.com
But any changes that are made to the Flask session through HTTP routes after the Socket.IO connection took place will not be accessible...
Read more >The Socket.IO Server — python-socketio documentation
This instance can be transformed into a standard WSGI application by wrapping it with the ... You can define a catch-all handler using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, I’ve made it work in this way:
In this implementation, the main difference with
cxt.session
is thatsocket.session
is “static”: it is not a getter but it is just the returned value (something to not worry about with cookies).@thanhlq I’ve found a way to fix this. here is some code: