I have a two namespace I want to trigger event on second namespace once the first namespace event call is completed... (server side)
I tried like this but didnt worked....
class FistNameSpace(socketio.AsyncNamespace):
async def on_connect(self, sid):
pass
#your connection code...
async def on_first_action(self, sid, data):
# your code
result = some_function(data)
SecondNameSpace().trigger_second_action(result)
class SecondNameSpace(socketio.AsyncNamespace):
async def on_connect(self, sid):
pass
#your connection code...
async def trigger_second_action(self, data):
# your code
await self.emit('my_event', data, room=myroom)
How to do it.? Ex: there are two different group of people connected to two different namespace based on their role... if person from first group trigger specific event then I want to broadcast some data to second group....
can someone please advice correct way to achieve it??