()
Example of how to send server generated events to clients.
Example of how to send server generated events to clients.
Example of how to send server generated events to clients .
def background_thread():
    """Example of how to send server generated events to clients."""
    count = 0
    while True:
        sio.sleep(10)
        count += 1
        sio.emit('my_response', {'data': 'Server generated event'},
                 namespace='/test')
def background_thread ( ) : count = 0 while True : sio . sleep ( 10 ) count += 1 sio . emit ( 'my_response' , { 'data' : 'Server generated event' } , namespace = '/test' )