mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-02 23:52:07 -04:00
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:
parent
bf5ce9e569
commit
c3d86d7674
@ -215,6 +215,13 @@ class Client extends EventEmitter
|
|||||||
else
|
else
|
||||||
this.compressor.write(buffer);
|
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;
|
module.exports = Client;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user