def run(args): agentApi = newApi(get_event_loop(), Logic()) try: web.run_app(agentApi, host=args.host, port=args.port) except OSError as e: if e.errno == errno.EADDRINUSE: traceback.print_exc() exit(2) else: raise
def start(self, loop): self._api = newApi(loop, self.msgHandler) super().start(loop)
def app(loop, logic): return newApi(loop, logic)
def __init__(self, loop): self.api = newApi(loop=loop)
def api(looper): return newApi(looper.loop)