MCPcopy Index your code
hub / github.com/nodejs/node / onlookupall

Function onlookupall

lib/dns.js:119–137  ·  view source on GitHub ↗
(err, addresses)

Source from the content-addressed store, hash-verified

117
118
119function onlookupall(err, addresses) {
120 if (err) {
121 return this.callback(new DNSException(err, 'getaddrinfo', this.hostname));
122 }
123
124 const family = this.family;
125 for (let i = 0; i < addresses.length; i++) {
126 const addr = addresses[i];
127 addresses[i] = {
128 address: addr,
129 family: family || isIP(addr),
130 };
131 }
132
133 this.callback(null, addresses);
134 if (this[kPerfHooksDnsLookupContext] && hasObserver('dns')) {
135 stopPerf(this, kPerfHooksDnsLookupContext, { detail: { addresses } });
136 }
137}
138
139
140// Easy DNS A/AAAA look up

Callers

nothing calls this directly

Calls 4

isIPFunction · 0.85
hasObserverFunction · 0.85
stopPerfFunction · 0.85
callbackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…