Uh oh!
There was an error while loading. Please reload this page.
net: support AF_UNIX paths in net.BoundSocket - #64399
Conversation
nodejs-github-bot
commented
Jul 10, 2026
Review requested:
|
1e91371 to
6a4fee8CompareCodecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #64399 +/- ##
=======================================
Coverage 90.14% 90.14% =======================================
Files 741 741 Lines 242133 242221 +88 Branches 45568 45584 +16 =======================================
+ Hits 218265 218360 +95
Misses 15371 15371 + Partials 8497 8490 -7
🚀 New features to boost your workflow:
|
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
LGTM with just some doc changes and one question about the implementation.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9571737 to
3429149CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jasnell
left a comment
There was a problem hiding this comment.
Couple of nits but otherwise LGTM
542c603 to
6472cd1Comparenodejs-github-bot
commented
Jul 20, 2026
Signed-off-by: Guy Bedford <guybedford@gmail.com>
Only trust the adopted handle's type when it came from a BoundSocket; a TLSSocket's _handle is a TLSWrap, not a Pipe, so TLS/HTTPS over pipes must still infer pipe-ness from the path option.
6472cd1 to
f30b9caComparenodejs-github-bot
commented
Jul 21, 2026
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
FYI this is blocked by the broken test-internet workflow affecting a number of PRs right now. Once #64624 lands this will be good to go.
Ethan-Arrowood
commented
Jul 24, 2026
64624 landed; requested a fresh CI run |
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Jul 24, 2026
Signed-off-by: Guy Bedford <guybedford@gmail.com> PR-URL: #64399 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
guybedford
commented
Jul 24, 2026
Landed in b420cb6. |
Signed-off-by: Guy Bedford <guybedford@gmail.com> PR-URL: #64399 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Signed-off-by: Guy Bedford <guybedford@gmail.com> PR-URL: #64399 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Signed-off-by: Guy Bedford <guybedford@gmail.com> PR-URL: #64399 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Extends
net.BoundSocket(#63951) with apathoption so it can immediately bind a named unix-domain socket (or Windows pipe) synchronously, not just TCP. This gives a public synchronous UDS bind through the same role-neutral handle, instead of reaching intoprocess.binding('pipe_wrap'), just as it replaces the need fortcp_wrapandudp_wrapsimilarly.pathis mutually exclusive withhost/port/ipv6Only/reusePort, and binds in the constructor so conflicts throw there like TCP does. A leading'\0'uses the Linux abstract namespace; an abstract path elsewhere throwsERR_INVALID_ARG_VALUE.address()returns the path string for a pipe (asServer.address()does), the address object for TCP.isPipegetter to tell the two apart.server.listen(bound)andnew net.Socket({ handle: bound }).connect()pick pipe vs TCP from the adopted handle's type.localAddress.Note two error codes match libuv rather than intuition: missing parent dir is
EACCES(libuv mapsENOENT), over-long path isEINVAL(UV_PIPE_NO_TRUNCATE).Tests cover sync bind +
address(), duplicate-bindEADDRINUSE, the listen/connect round-trip, bound-clientlocalAddress, the abstract namespace, and the error paths.