I use the python socket.io client and I would like to know if it is possible to retrieve the session cookie, if so, how?
Another question, is it possible to get the answer from an .emit without going through an @sio.event
or @sio.on()
? As with the websockets library:
websocket.send('Hi')
response = websocket.rcv()
print(response) -> "Hi :)"
If not, is it possible to create an event/on that retrieves messages from the server that do not contain an event name?
For example I send from the client: sio.emit("GetNbrPlayers")
but the server answers me [{"data": "5"}]
without an event before the data (it is a server/api that uses socket.io too), I would like to get this message but impossible with an event/on because there is no event name in the answer.
Thank you in advance!