panono.py 文件源码

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

项目:panonoctl 作者: florianl 项目源码 文件源码
def connect(self):
        """

        Opens a connection

        """
        ws = None
        # Let us discover, where we need to connect to
        if self.ip == None or self.port == None:
            (ws, self.usn, self.apiV, self.srv) = ssdp.discover(None)
        else:
            ws = "ws://%s" % self.ip
            if not self.port is None:
                ws = "{}:{}".format(ws, self.port)
            if not self.path is None:
                ws = "{}/{}".format(ws, self.path)
        if ws == None:
            return False
        self.ws = websocket.create_connection(ws)
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号