net: make `isIPv4` and `isIPv6` more efficient
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: https://github.com/nodejs/node/pull/5478 Reviewed-By:Evan Lucas <evanlucas@me.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io>
parent
62926d85
Please register or sign in to comment