diff --git a/doc/api/net.md b/doc/api/net.md index e6bbb05b0e..e11f6cd627 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