Add client.connect(port, host) for backwards-compatibility

Would like to remove this method because it is hardcoded to dependent on
TCP/IP, but the serverTest uses it. Load tcp_dns as needed.
This commit is contained in:
deathcap 2016-01-26 01:05:32 -08:00
parent bf5ce9e569
commit c3d86d7674

View File

@ -215,6 +215,13 @@ class Client extends EventEmitter
else
this.compressor.write(buffer);
}
// TCP/IP-specific (not generic Stream) method for backwards-compatibility
connect(port, host) {
var options = {port, host};
require('./client/tcp_dns')(this, options);
options.connect(this);
}
}
module.exports = Client;