diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2016-03-21 17:08:34 +0300 |
---|---|---|
committer | Azat Khuzhin <a3at.mail@gmail.com> | 2016-03-23 12:46:47 +0300 |
commit | 8cbe65d5f44246ad3f7ab408d22e797e5b9e5b81 (patch) | |
tree | 7a6015b9c7a4fdcbf9759e23165be4b9cbce7634 /util-internal.h | |
parent | 334340da51dcfe51bc6cc049983a0e6eb4c0ed0f (diff) | |
download | libevent-8cbe65d5f44246ad3f7ab408d22e797e5b9e5b81.tar.gz |
evdns: export cancel via callbacks in util (like async lib core/extra issues)
Diffstat (limited to 'util-internal.h')
-rw-r--r-- | util-internal.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util-internal.h b/util-internal.h index ff6c5e48..b851e2ae 100644 --- a/util-internal.h +++ b/util-internal.h @@ -357,8 +357,10 @@ typedef struct evdns_getaddrinfo_request* (*evdns_getaddrinfo_fn)( const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, void (*cb)(int, struct evutil_addrinfo *, void *), void *arg); - void evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn); +typedef void (*evdns_getaddrinfo_cancel_fn)( + struct evdns_getaddrinfo_request *req); +void evutil_set_evdns_getaddrinfo_cancel_fn_(evdns_getaddrinfo_cancel_fn fn); struct evutil_addrinfo *evutil_new_addrinfo_(struct sockaddr *sa, ev_socklen_t socklen, const struct evutil_addrinfo *hints); @@ -368,10 +370,12 @@ void evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints); int evutil_getaddrinfo_common_(const char *nodename, const char *servname, struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum); -int evutil_getaddrinfo_async_(struct evdns_base *dns_base, +struct evdns_getaddrinfo_request *evutil_getaddrinfo_async_( + struct evdns_base *dns_base, const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, void (*cb)(int, struct evutil_addrinfo *, void *), void *arg); +void evutil_getaddrinfo_cancel_async_(struct evdns_getaddrinfo_request *data); /** Return true iff sa is a looback address. (That is, it is 127.0.0.1/8, or * ::1). */ |