EVENT_ASR_RUN(3)

NAME
event_asr_run - asr query scheduler

SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <asr.h>
#include <event.h>
#include <stdlib.h>
struct event_asr *
event_asr_run(struct asr_query *aq, void (*fn)(struct asr_result *, void *), void *arg);
void
event_asr_abort(struct event_asr *eva);

DESCRIPTION
The event(3) API needs to be initialized with event_init() before event_asr_* may be used.

The event_asr_run function is used to schedule the asynchronous resolver query aq to run within a libevent event loop, and call the fn callback when the result is available. The extra arg parameter is passed to the callback. The user does not need to set up an event structure for using this function. It returns an opaque handle representing the running query. This handle becomes invalid before the callback is run. It can be cancelled by calling the event_asr_abort() function. See asr_run(3) for details on constructing asynchronous resolver queries.

SEE ALSO
asr_run(3), event(3)