def __init__(self, url):
self.host, port_str = url.split(':')
self.port = int(port_str)
self.server = None
# create the thread object
self.thread = threading.Thread(target=self._start_listening_blocking)
# wrap Flask application with socketio's middleware
self.app = socketio.Middleware(sio, app)
评论列表
文章目录