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

Function ipToInt

lib/internal/http.js:61–69  ·  view source on GitHub ↗
(ip)

Source from the content-addressed store, hash-verified

59}
60
61function ipToInt(ip) {
62 const octets = ip.split('.');
63 let result = 0;
64 for (let i = 0; i < octets.length; i++) {
65 result = (result << 8) + NumberParseInt(octets[i]);
66 }
67 // Force unsigned 32-bit result
68 return result >>> 0;
69}
70
71// There are two factors in play when proxying the request:
72// 1. What the request protocol is, that is, whether users are sending it via

Callers 1

shouldUseProxyMethod · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…