* Returns the bound address, the address family name, and port of the server * as reported by the operating system if listening on an IP socket. * If the server is listening on a pipe or UNIX domain socket, the name is * returned as a string. * * @return {(Object|String|null)} The add
()
| 151 | * @public |
| 152 | */ |
| 153 | address() { |
| 154 | if (this.options.noServer) { |
| 155 | throw new Error('The server is operating in "noServer" mode'); |
| 156 | } |
| 157 | |
| 158 | if (!this._server) return null; |
| 159 | return this._server.address(); |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Stop the server from accepting new connections and emit the `'close'` event |
no outgoing calls