tls doc: update docs to reflect API change
authorMaciej Małecki <maciej.malecki@notimplemented.org>
Wed, 2 Nov 2011 00:27:50 +0000 (01:27 +0100)
committerkoichik <koichik@improvement.jp>
Sun, 8 Jan 2012 10:13:36 +0000 (11:13 +0100)
Refs #1983.

doc/api/tls.markdown

index 3507478..7bdfe4c 100644 (file)
@@ -102,10 +102,16 @@ You can test this server by connecting to it with `openssl s_client`:
     openssl s_client -connect 127.0.0.1:8000
 
 
+#### tls.connect(options, [secureConnectListener])
 #### tls.connect(port, [host], [options], [secureConnectListener])
 
-Creates a new client connection to the given `port` and `host`. (If `host`
-defaults to `localhost`.) `options` should be an object which specifies
+Creates a new client connection to the given `port` and `host` (old API) or
+`options.port` and `options.host`. (If `host` is omitted, it defaults to
+`localhost`.) `options` should be an object which specifies:
+
+  - `host`: Host the client should connect to
+
+  - `port`: Port the client should connect to
 
   - `key`: A string or `Buffer` containing the private key of the client in
     PEM format.