async def start_server_in_loop(runner, hostname, port, agent):
    """
    Listens to http requests and sends them to the webapp.

    Args:
        runner: AppRunner to process the http requests
        hostname: host name to listen from.
        port: port to listen from.
        agent: agent that owns the web app.
    """
    await runner.setup()
    agent.web.server = aioweb.TCPSite(runner, hostname, port)
    await agent.web.server.start()
    logger.info(f"Serving on http://{hostname}:{port}/")
Listens to http requests and sends them to the webapp.

    Args:
        runner: AppRunner to process the http requests
        hostname: host name to listen from.
        port: port to listen from.
        agent: agent that owns the web app.