function(port, host, opts) {
  if (!(this instanceof Connector)) {
    return new Connector(port, host, opts);
  }

  EventEmitter.call(this);
  this.port = port;
  this.host = host;
  this.opts = opts;
  this.heartbeats = opts.heartbeats || true;
  this.closeTimeout = opts.closeTimeout || 60;
  this.heartbeatTimeout = opts.heartbeatTimeout || 60;
  this.heartbeatInterval = opts.heartbeatInterval || 25;
}
function(port, host, opts) {
  if (!(this instanceof Connector)) {
    return new Connector(port, host, opts);
  }

  EventEmitter.call(this);
  this.port = port;
  this.host = host;
  this.opts = opts;
  this.heartbeats = opts.heartbeats || true;
  this.closeTimeout = opts.closeTimeout || 60;
  this.heartbeatTimeout = opts.heartbeatTimeout || 60;
  this.heartbeatInterval = opts.heartbeatInterval || 25;
}
function ( port , host , opts ) { if ( ! ( this instanceof Connector ) ) { return new Connector ( port , host , opts ) ; } EventEmitter . call ( this ) ; this . port = port ; this . host = host ; this . opts = opts ; this . heartbeats = opts . heartbeats || true ; this . closeTimeout = opts . closeTimeout || 60 ; this . heartbeatTimeout = opts . heartbeatTimeout || 60 ; this . heartbeatInterval = opts . heartbeatInterval || 25 ; }
Connector that manager low level connection and protocol bewteen server and client.
Develper can provide their own connector to switch the low level prototol, such as tcp or probuf.
Connector that manager low level connection and protocol bewteen server and client . Develper can provide their own connector to switch the low level prototol such as tcp or probuf .
Constructor for a new Cluster connector.