Skip to content

Commit 13487c4

Browse files
Flarnajasnell
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 cfe7b34 commit 13487c4

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
@@ -99,11 +99,14 @@ added: v0.1.90
9999
-->
100100

101101
Returns the bound address, the address family name, and port of the server
102-
as reported by the operating system.
102+
as reported by the operating system if listening on an IP socket.
103103
Useful to find which port was assigned when getting an OS-assigned address.
104104
Returns an object with `port`, `family`, and `address` properties:
105105
`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
106106

107+
For a server listening on a pipe or UNIX domain socket, the name is returned
108+
as a string.
109+
107110
Example:
108111

109112
```js

0 commit comments

Comments
 (0)