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
Beispiel #2
0
 def start(self, loop):
     self._api = newApi(loop, self.msgHandler)
     super().start(loop)
Beispiel #3
0
def app(loop, logic):
    return newApi(loop, logic)
Beispiel #4
0
 def __init__(self, loop):
     self.api = newApi(loop=loop)
Beispiel #5
0
def api(looper):
    return newApi(looper.loop)