websocket.py 文件源码

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

项目:engel 作者: Dalloriam 项目源码 文件源码
def start(self, callback=None):
        self.loop.run_until_complete(self.server)

        try:
            path = os.path.dirname(os.path.realpath(__file__))
            webbrowser.open('file:///' + os.path.join(path, 'index.html'))
            self.loop.run_forever()

        except KeyboardInterrupt:
            pass

        finally:
            self.server.close()
            self.loop.close()

            if callback is not None and callable(callback):
                callback()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号