|
|
|
@ -56,6 +56,7 @@ function Connection(config) {
|
|
|
|
|
config || (config = {});
|
|
|
|
|
|
|
|
|
|
this._config = {
|
|
|
|
|
localAddress: config.localAddress,
|
|
|
|
|
socket: config.socket,
|
|
|
|
|
socketTimeout: config.socketTimeout || 0,
|
|
|
|
|
host: config.host || 'localhost',
|
|
|
|
@ -282,7 +283,11 @@ Connection.prototype.connect = function() {
|
|
|
|
|
socket.destroy();
|
|
|
|
|
}, config.connTimeout);
|
|
|
|
|
|
|
|
|
|
socket.connect(config.port, config.host);
|
|
|
|
|
socket.connect({
|
|
|
|
|
port: config.port,
|
|
|
|
|
host: config.host,
|
|
|
|
|
localAddress: config.localAddress
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Connection.prototype.serverSupports = function(cap) {
|
|
|
|
|