socketrpc.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:aiolocust 作者: kpidata 项目源码 文件源码
def _connect(self):
        sock = socket.create_connection((self.host, self.port))

        def handle():
            try:
                while True:
                    self.command_queue.put_nowait(_recv_obj(sock))
            except Exception as e:
                try:
                    sock.close()
                except:
                    pass

        gevent.spawn(handle)
        return sock
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号