epmd.py 文件源码

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

项目:Pyrlang 作者: esl 项目源码 文件源码
def connect(self) -> bool:
        """ Establish a long running connection to EPMD, will not return until
            the connection has been established.

            :return: True
        """
        while True:
            try:
                print("EPMD: Connecting %s:%d" % (self.host_, self.port_))
                host_port = (self.host_, self.port_)
                self.sock_ = socket.create_connection(address=host_port,
                                                      timeout=5.0)
                break  # the connect loop

            except socket.error as err:
                print("EPMD: connection error:", err)
                gevent.sleep(5)

        print("EPMD: Socket connected")
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号