Пример #1
0
def run_recieve(room_id):
    """Run the program of recieving danmakus.

    :param room_id: the id of live room.
    """
    danmaku_queue = DanmakuQueue(room_id)
    try:
        with generate_socket(room_id) as sock:
            produce_danmaku.switch(sock, danmaku_queue, True)
    except RuntimeError and KeyboardInterrupt:
        pass