tls doc: update docs to reflect API change

Refs #1983.
This commit is contained in:
Maciej Małecki
2011-11-02 01:27:50 +01:00
committed by koichik
parent 39484f49ef
commit 0321adbcf4

View 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.