From c3d86d7674fd44a5a40078f89c5931034b561def Mon Sep 17 00:00:00 2001 From: deathcap Date: Tue, 26 Jan 2016 01:05:32 -0800 Subject: [PATCH] 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. --- src/client.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client.js b/src/client.js index 200d738..8a0a129 100644 --- a/src/client.js +++ b/src/client.js @@ -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;