Commit b16f67a0 authored by Vladimir Kurchatkin's avatar Vladimir Kurchatkin Committed by Rod Vagg
Browse files

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: default avatarEvan Lucas <evanlucas@me.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarRoman Reiss <me@silverwind.io>
parent 62926d85
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment