app/app.py
async def background_thread():
    """Example of how to send server generated events to clients."""
    while True:
        await app.sio.sleep(10)
        print('emitting background generated message')
        await app.sio.emit('stream_response', random.choice(loading_messages), namespace='/socketio')
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 .
async def background_thread():
    while True:
        await app.sio.sleep(10)
        print('emitting background generated message')
        await app.sio.emit('stream_response', random.choice(loading_messages), namespace='/socketio')
async def background_thread ( ) : while True : await app . sio . sleep ( 10 ) print ( 'emitting background generated message' ) await app . sio . emit ( 'stream_response' , random . choice ( loading_messages ) , namespace = '/socketio' )
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."""