lib/connectors/commands/heartbeat.js
function(opts) {
  opts = opts || {};
  this.heartbeat = null;
  this.timeout = null;
  this.disconnectOnTimeout = opts.disconnectOnTimeout;

  if(opts.heartbeat) {
    this.heartbeat = opts.heartbeat * 1000; // heartbeat interval
    this.timeout = opts.timeout * 1000 || this.heartbeat * 2;      // max heartbeat message timeout
    this.disconnectOnTimeout = true;
  }

  this.timeouts = {};
  this.clients = {};
}
function(opts) {
  opts = opts || {};
  this.heartbeat = null;
  this.timeout = null;
  this.disconnectOnTimeout = opts.disconnectOnTimeout;

  if(opts.heartbeat) {
    this.heartbeat = opts.heartbeat * 1000; // heartbeat interval
    this.timeout = opts.timeout * 1000 || this.heartbeat * 2;      // max heartbeat message timeout
    this.disconnectOnTimeout = true;
  }

  this.timeouts = {};
  this.clients = {};
}
function ( opts ) { opts = opts || { } ; this . heartbeat = null ; this . timeout = null ; this . disconnectOnTimeout = opts . disconnectOnTimeout ; if ( opts . heartbeat ) { this . heartbeat = opts . heartbeat * 1000 ; // heartbeat interval this . timeout = opts . timeout * 1000 || this . heartbeat * 2 ; // max heartbeat message timeout this . disconnectOnTimeout = true ; } this . timeouts = { } ; this . clients = { } ; }
Process heartbeat request.

@param {Object} opts option request
opts.heartbeat heartbeat interval
Process heartbeat request .