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

Function hasMultiLocalhost

test/common/net.js:20–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20function hasMultiLocalhost() {
21 const { internalBinding } = require('internal/test/binding');
22 const { TCP, constants: TCPConstants } = internalBinding('tcp_wrap');
23 const t = new TCP(TCPConstants.SOCKET);
24 const ret = t.bind('127.0.0.2', 0);
25 t.close();
26 return ret === 0;
27}
28
29module.exports = {
30 checkSupportReusePort,

Calls 3

closeMethod · 0.65
requireFunction · 0.50
bindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…