Ejemplo n.º 1
0
def test_connect():
    emit('price_responce', get_info())
    global thread
    with thread_lock:
        if thread is None:
            thread = socketio.start_background_task(target=background_thread)
Ejemplo n.º 2
0
def test_message():
    emit('price_responce', get_info())
Ejemplo n.º 3
0
def background_thread():
    """Example of how to send server generated events to clients."""
    while True:
        socketio.sleep(5)
        socketio.emit('price_responce', get_info())
def background_thread():
    while True:
        socketio.sleep(5)
        socketio.emit('price_responce', get_info())