diff options
author | Yuchen Zeng <zyc@google.com> | 2017-06-04 01:41:15 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-06-04 01:41:15 -0700 |
commit | 3b4bed273cd38964d097cb110f894c9963137af2 (patch) | |
tree | cdbd3532bb9b90793daea4753004a7a2a1d79649 /src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h | |
parent | 24e3bc5510bfee61d9f62feac95fbe32b1267b85 (diff) |
Cancel the dns lookup in dns_ares_shutdown
Diffstat (limited to 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h')
-rw-r--r-- | src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 9bcc115beb..4a8374a192 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -40,6 +40,8 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/resolve_address.h" +typedef struct grpc_ares_request grpc_ares_request; + /* Asynchronously resolve addr. Use \a default_port if a port isn't designated in addr, otherwise use the port in addr. grpc_ares_init() must be called at least once before this function. \a on_done may be called directly in this @@ -59,11 +61,15 @@ extern void (*grpc_resolve_address_ares)(grpc_exec_ctx *exec_ctx, function. \a on_done may be called directly in this function without being scheduled with \a exec_ctx, it must not try to acquire locks that are being held by the caller. */ -extern void (*grpc_dns_lookup_ares)( +extern grpc_ares_request *(*grpc_dns_lookup_ares)( grpc_exec_ctx *exec_ctx, const char *dns_server, const char *addr, const char *default_port, grpc_pollset_set *interested_parties, grpc_closure *on_done, grpc_lb_addresses **addresses, bool check_grpclb); +/* Cancel the pending grpc_ares_request \a request */ +void grpc_cancel_ares_request(grpc_exec_ctx *exec_ctx, + grpc_ares_request *request); + /* Initialize gRPC ares wrapper. Must be called at least once before grpc_resolve_address_ares(). */ grpc_error *grpc_ares_init(void); |