diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2017-12-25 10:48:33 +0300 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2018-01-04 05:27:46 +0300 |
commit | a0cc20eaba44292d6ad607109b32c541ff564933 (patch) | |
tree | 58743fccfd273c62cb83967078f89369e288fd9f /src/cares_wrap.cc | |
parent | c3e75ae0ee97553f5f9c4150c936ae9d81fca558 (diff) |
src: remove unused GetHostByNameWrap
It was a wrapper for `ares_gethostbyname()` that I'm unsure about if
it was ever exposed at the binding layer, let alone the public API.
PR-URL: https://github.com/nodejs/node/pull/17860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'src/cares_wrap.cc')
-rw-r--r-- | src/cares_wrap.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 80335f2bea6..b9ab1b215e0 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1772,33 +1772,6 @@ class GetHostByAddrWrap: public QueryWrap { }; -class GetHostByNameWrap: public QueryWrap { - public: - explicit GetHostByNameWrap(ChannelWrap* channel, Local<Object> req_wrap_obj) - : QueryWrap(channel, req_wrap_obj) { - } - - int Send(const char* name, int family) override { - ares_gethostbyname(channel_->cares_channel(), - name, - family, - Callback, - static_cast<void*>(static_cast<QueryWrap*>(this))); - return 0; - } - - protected: - void Parse(struct hostent* host) override { - HandleScope scope(env()->isolate()); - - Local<Array> addresses = HostentToAddresses(env(), host); - Local<Integer> family = Integer::New(env()->isolate(), host->h_addrtype); - - this->CallOnComplete(addresses, family); - } -}; - - template <class Wrap> static void Query(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); |