joyent/node — pull request #3951 by shigeki (2012-08-30 16:13:23+00:00)
Title: tls: support unix domain socket/named pipe in tls.connect

The first argument of tls.connect(), `port`, in node-v0.8 takes only number type while that in node-v0.6 not. The following script does not work in node-v0.8 unless `port` is changed into `+port` to be number type.
```javascript
var tls = require('tls');
var port = process.argv[3];
var host = process.argv[2];
var client = tls.connect(port, host, function() {
console.log('connected');
client.end();
});
```
This also causes the failure of `tls.connect()` with using Unix domain socket or Windows named pipe.
Although `tls.connect(path, callback)` is not documented in the manual, there is no reason to prohibit it.
I made this commit against v0.8 branch to solve these two problems since this is a compatibility issue between v0.6 and v0.8.