コード例 #1
0
ファイル: socket_process.py プロジェクト: hyqgod/Barrage
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
コード例 #2
0
ファイル: socket_process.py プロジェクト: haozi23333/Barrage
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:
        pass
コード例 #3
0
ファイル: socket_process.py プロジェクト: OctavianLee/Barrage
def run_recieve(room_id):
    """Run the program of recieving danmakus.

    :param room_id: the id of live room.
    """
    danmaku_queue = DanmakuQueue(room_id)
    print "请求服务器连接"
    while True:
        with generate_socket(room_id) as sock:
            try:
                produce_danmaku.switch(sock, danmaku_queue, True)
            except RuntimeError and KeyboardInterrupt:
                continue