tls: make `tls.connect` accept port and host in `options`
authorMaciej Małecki <maciej.malecki@notimplemented.org>
Tue, 1 Nov 2011 15:23:30 +0000 (16:23 +0100)
committerkoichik <koichik@improvement.jp>
Sun, 8 Jan 2012 10:12:56 +0000 (11:12 +0100)
commit4b4d05979118b028f6d198ee1782c1b48a0ea8fc
tree8f5aad560ddef9fe6d34e5282590acc13fa4421a
parent8e5674fb5cb31fd872b9b74fde0430603806a48a
tls: make `tls.connect` accept port and host in `options`

Previous API used form:

    tls.connect(443, "google.com", options, ...)

now it's replaced with:

    tls.connect({port: 443, host: "google.com", ...}, ...)

It simplifies argument parsing in `tls.connect` and makes the API
consistent with other parts.

Fixes #1983.
lib/tls.js