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

Method setLocalAddress

lib/internal/dns/utils.js:178–190  ·  view source on GitHub ↗
(ipv4, ipv6)

Source from the content-addressed store, hash-verified

176
177
178 setLocalAddress(ipv4, ipv6) {
179 validateString(ipv4, 'ipv4');
180
181 if (ipv6 !== undefined) {
182 validateString(ipv6, 'ipv6');
183 }
184
185 this._handle.setLocalAddress(ipv4, ipv6);
186
187 if (isBuildingSnapshot()) {
188 this[kSnapshotStates].localAddress = { ipv4, ipv6 };
189 }
190 }
191
192 // TODO(joyeecheung): consider exposing this if custom DNS resolvers
193 // end up being useful for snapshot users.

Callers 2

Calls 1

isBuildingSnapshotFunction · 0.85

Tested by

no test coverage detected