def __init__(self, port=46658, app=None):
if not app or not isinstance(app, BaseApplication):
log.error("Application missing or not an instance of Base Application")
raise TypeError("Application missing or not an instance of Base Application")
self.port = port
self.protocol = ProtocolHandler(app)
self.server = StreamServer(('0.0.0.0', port), handle=self.__handle_connection)
评论列表
文章目录