Skip to content

Commit 87b336a

Browse files
bnoordhuisMylesBorins
authored andcommitted
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: #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>
1 parent 294c5f4 commit 87b336a

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/cares_wrap.cc

-27
Original file line numberDiff line numberDiff line change
@@ -1772,33 +1772,6 @@ class GetHostByAddrWrap: public QueryWrap {
17721772
};
17731773

17741774

1775-
class GetHostByNameWrap: public QueryWrap {
1776-
public:
1777-
explicit GetHostByNameWrap(ChannelWrap* channel, Local<Object> req_wrap_obj)
1778-
: QueryWrap(channel, req_wrap_obj) {
1779-
}
1780-
1781-
int Send(const char* name, int family) override {
1782-
ares_gethostbyname(channel_->cares_channel(),
1783-
name,
1784-
family,
1785-
Callback,
1786-
static_cast<void*>(static_cast<QueryWrap*>(this)));
1787-
return 0;
1788-
}
1789-
1790-
protected:
1791-
void Parse(struct hostent* host) override {
1792-
HandleScope scope(env()->isolate());
1793-
1794-
Local<Array> addresses = HostentToAddresses(env(), host);
1795-
Local<Integer> family = Integer::New(env()->isolate(), host->h_addrtype);
1796-
1797-
this->CallOnComplete(addresses, family);
1798-
}
1799-
};
1800-
1801-
18021775
template <class Wrap>
18031776
static void Query(const FunctionCallbackInfo<Value>& args) {
18041777
Environment* env = Environment::GetCurrent(args);

0 commit comments

Comments
 (0)