def METHOD_NAME():
    # async listen
    if g.listen:
        _xprt, _host, _port = g.listen.split(":")
        _x = ldms.Xprt(name = _xprt)
        _x.listen(host=_host, port=_port, cb=listen_cb, cb_arg=None)
    if g.connect:
        g.xprt, g.host, g.port = g.connect.split(":")
    # async connect
    g.x = ldms.Xprt(name=g.xprt)
    g.x.connect(host=g.host, port=g.port, cb=client_cb, cb_arg=None)
    # wait for lookup
    g.cond.acquire()
    while not g.done_lookup:
        g.cond.wait()
    g.cond.release()
    assert(g.num_lookups == g.num_sets)
    log.info("lookup completed")
    # periodically update sets
    while True:
        interval_block(g.interval, g.offset)
        g.num_updates = 0
        for s in g.sets.values():
            s.update(client_update_cb, None)
        # wait for update completions
        g.cond.acquire()
        while g.num_updates < g.num_sets:
            g.cond.wait()
        g.cond.release()
        v = 0
        n_consistent = sum( s.is_consistent for s in g.sets.values() )
        log.info("{}/{} sets consistent".format(n_consistent, g.num_sets))
        if False:
            for s in g.sets.values():
                v += verify_set(s)
            log.info("{}/{} sets verified".format(v, g.num_sets))