From c01a2d545e128db532bf7e8532b595a2d77e10d8 Mon Sep 17 00:00:00 2001 From: Flarna Date: Mon, 8 May 2017 22:25:28 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/12907 Fixes: https://github.com/nodejs/node/issues/12895 Reviewed-By: Refael Ackermann Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- doc/api/net.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/net.md b/doc/api/net.md index e6bbb05b0e2c61..e11f6cd627204e 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -58,11 +58,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