Skip to content

Commit

Permalink
doc: add docs for server.address() for pipe case
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Flarna authored and jasnell committed May 10, 2017
1 parent cfe7b34 commit 13487c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ added: v0.1.90
-->

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

For a server listening on a pipe or UNIX domain socket, the name is returned
as a string.

Example:

```js
Expand Down

0 comments on commit 13487c4

Please sign in to comment.