Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@iij.ad.jp>2012-04-13 11:45:38 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-04-16 20:00:47 +0400
commit0d1314233248cb9b236b98477d7b69b2bbf97c08 (patch)
treee08e6a10be32c3c9427ea21dcec4faa9da5b73bd /doc
parent21d26839762c52f20edcfcc245a0cfe1acb21196 (diff)
tcp: make getsockname() return address family as string
Diffstat (limited to 'doc')
-rw-r--r--doc/api/net.markdown13
-rw-r--r--doc/api/tls.markdown11
2 files changed, 14 insertions, 10 deletions
diff --git a/doc/api/net.markdown b/doc/api/net.markdown
index dbfced3e27a..6908f61d08e 100644
--- a/doc/api/net.markdown
+++ b/doc/api/net.markdown
@@ -168,9 +168,11 @@ event.
### server.address()
-Returns the bound address and port of the server as reported by the operating system.
+Returns the bound address, the address family name and port of the server
+as reported by the operating system.
Useful to find which port was assigned when giving getting an OS-assigned address.
-Returns an object with two properties, e.g. `{"address":"127.0.0.1", "port":2121}`
+Returns an object with three properties, e.g.
+`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
Example:
@@ -356,9 +358,10 @@ initialDelay will leave the value unchanged from the default
### socket.address()
-Returns the bound address and port of the socket as reported by the operating
-system. Returns an object with two properties, e.g.
-`{"address":"192.168.57.1", "port":62053}`
+Returns the bound address, the address family name and port of the
+socket as reported by the operating system. Returns an object with
+three properties, e.g.
+`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
### socket.remoteAddress
diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown
index a1fee640d4e..a659006479d 100644
--- a/doc/api/tls.markdown
+++ b/doc/api/tls.markdown
@@ -323,8 +323,8 @@ event.
### server.address()
-Returns the bound address and port of the server as reported by the operating
-system.
+Returns the bound address, the address family name and port of the
+server as reported by the operating system.
See [net.Server.address()](net.html#server.address) for more information.
### server.addContext(hostname, credentials)
@@ -414,9 +414,10 @@ information.
### cleartextStream.address()
-Returns the bound address and port of the underlying socket as reported by the
-operating system. Returns an object with two properties, e.g.
-`{"address":"192.168.57.1", "port":62053}`
+Returns the bound address, the address family name and port of the
+underlying socket as reported by the operating system. Returns an
+object with three properties, e.g.
+`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
### cleartextStream.remoteAddress