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

Function filterOnlyValidAddress

lib/net.js:2421–2431  ·  view source on GitHub ↗
(addresses)

Source from the content-addressed store, hash-verified

2419}
2420
2421function filterOnlyValidAddress(addresses) {
2422 // Return the first non IPV6 link-local address if present
2423 for (const address of addresses) {
2424 if (!isIpv6LinkLocal(address.address)) {
2425 return address;
2426 }
2427 }
2428
2429 // Otherwise return the first address
2430 return addresses[0];
2431}
2432
2433function lookupAndListen(self, port, address, backlog,
2434 exclusive, flags) {

Callers 1

lookupAndListenFunction · 0.85

Calls 1

isIpv6LinkLocalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…