Flask-socketio: access to the socket object

Created on 27 Oct 2019  路  3Comments  路  Source: miguelgrinberg/Flask-SocketIO

I would love to get access to the whole socket object like you do with nodejs socket.io it makes life a lot easier. Like getting the socket object as a parameter like in nodejs. If its in json it be all the better that would be great. Please consider this in the project. Thank you

question

All 3 comments

I haven't copied the node implementation, so you can't really apply a parallel between the two. What is it specifically that makes your life easier with node vs. this server?

since i am making a game I sometimes have to juggle around different sockets and pair up some users with on the same team and different users on different teams. This would be a lot easier if i can put objects in an array and shuffle them and then attach a team to them and connect the all in one room

Instead of using the socket object, use the sid string to represent each client.

Was this page helpful?
0 / 5 - 0 ratings