lib/middleware/smartrelay.js
function SmartRelay(socket, options) {
  stream.Transform.call(this, {});

  this.options = merge(Object.create(SmartRelay.DEFAULTS), options || {});
  this.socket = socket;
  this.recentData = [];

  this.peers = function () {
    return [];
  };
}
function SmartRelay(socket, options) {
  stream.Transform.call(this, {});

  this.options = merge(Object.create(SmartRelay.DEFAULTS), options || {});
  this.socket = socket;
  this.recentData = [];

  this.peers = function () {
    return [];
  };
}
function SmartRelay ( socket , options ) { stream . Transform . call ( this , { } ) ; this . options = merge ( Object . create ( SmartRelay . DEFAULTS ) , options || { } ) ; this . socket = socket ; this . recentData = [ ] ; this . peers = function ( ) { return [ ] ; } ; }
Smarter implementation of a gossip protocol
@constructor
@param {object} socket
@param {object} options
Smarter implementation of a gossip protocol