I have the latest version (5.11.0) of python-socketio installed.
I was able to get catch-all events working,
@sio.on('*')
async def handle_event(event, sid, *args):
I'm following the example/syntax as in the documentation for catch-all namespaces, but couldn't get that to work. Below event handler is not getting invoked.
@sio.on('my_event', namespace='*')
async def my_event(namespace, sid, data):
Client code:
await sio.emit('my_event', data='Message from client', namespace='/test')
If not catch-all namespaces, is there a way to get the namespace from where data was received on the server side? I want to send message back to the client on the same namespace.