diff --git a/doc/api/net.md b/doc/api/net.md index 9055464972421c..dce6a5e77e738e 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -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