Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 350f4cf

Browse filesBrowse files
jeanregisserMyles Borins
authored andcommitted
doc: server.listen truncates socket path on unix
Internally it ends up calling `uv_pipe_bind` with the given path which itself is documented to truncate the path. See http://docs.libuv.org/en/v1.x/pipe.html#c.uv_pipe_bind This is NOT a bug, but a restriction of the unix socket api, as it stores the path in `sockaddr_un.sun_path` (104 chars on OS X, 108 chars on Linux), see `man unix`. PR-URL: #6659 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexander Makarenko <estliberitas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent af4b56d commit 350f4cf
Copy full SHA for 350f4cf

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/net.md‎

Copy file name to clipboardExpand all lines: doc/api/net.md
+6-3Lines changed: 6 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ This function is asynchronous. When the server has been bound,
153153
will be added as a listener for the [`'listening'`][] event.
154154

155155
On UNIX, the local domain is usually known as the UNIX domain. The path is a
156-
filesystem path name. It is subject to the same naming conventions and
157-
permissions checks as would be done on file creation, will be visible in the
158-
filesystem, and will *persist until unlinked*.
156+
filesystem path name. It gets truncated to `sizeof(sockaddr_un.sun_path)`
157+
bytes, decreased by 1. It varies on different operating system between 91 and
158+
107 bytes. The typical values are 107 on Linux and 103 on OS X. The path is
159+
subject to the same naming conventions and permissions checks as would be done
160+
on file creation, will be visible in the filesystem, and will *persist until
161+
unlinked*.
159162

160163
On Windows, the local domain is implemented using a named pipe. The path *must*
161164
refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.