Skip to content

Commit c01a2d5

Browse files
FlarnaMylesBorins
authored andcommitted
doc: add docs for server.address() for pipe case
Add documentation for net.server.address() for the case it is listening on a pipe or unix domain socket instead an IP socket. PR-URL: #12907 Fixes: #12895 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent d743783 commit c01a2d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/net.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ added: v0.1.90
5858
-->
5959

6060
Returns the bound address, the address family name, and port of the server
61-
as reported by the operating system.
61+
as reported by the operating system if listening on an IP socket.
6262
Useful to find which port was assigned when getting an OS-assigned address.
6363
Returns an object with `port`, `family`, and `address` properties:
6464
`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
6565

66+
For a server listening on a pipe or UNIX domain socket, the name is returned
67+
as a string.
68+
6669
Example:
6770

6871
```js

0 commit comments

Comments
 (0)