thali/NextGeneration/identityExchange/connectionTable.js
function ConnectionTable(thaliReplicationManager) {
  EventEmitter.call(this);
  var self = this;
  this.thaliReplicationManager = thaliReplicationManager;
  this.connectionTable = {};
  this.connectionSuccessListener = function (successObject) {
    self.connectionTable[successObject.peerIdentifier] = {
      muxPort: successObject.muxPort,
      time: Date.now()
    };

    self.emit(successObject.peerIdentifier, self.connectionTable[successObject.peerIdentifier]);
  };
  thaliReplicationManager.on(ThaliReplicationManager.events.CONNECTION_SUCCESS, this.connectionSuccessListener);
}
function ConnectionTable(thaliReplicationManager) {
  EventEmitter.call(this);
  var self = this;
  this.thaliReplicationManager = thaliReplicationManager;
  this.connectionTable = {};
  this.connectionSuccessListener = function (successObject) {
    self.connectionTable[successObject.peerIdentifier] = {
      muxPort: successObject.muxPort,
      time: Date.now()
    };

    self.emit(successObject.peerIdentifier, self.connectionTable[successObject.peerIdentifier]);
  };
  thaliReplicationManager.on(ThaliReplicationManager.events.CONNECTION_SUCCESS, this.connectionSuccessListener);
}
function ConnectionTable ( thaliReplicationManager ) { EventEmitter . call ( this ) ; var self = this ; this . thaliReplicationManager = thaliReplicationManager ; this . connectionTable = { } ; this . connectionSuccessListener = function ( successObject ) { self . connectionTable [ successObject . peerIdentifier ] = { muxPort : successObject . muxPort , time : Date . now ( ) } ; self . emit ( successObject . peerIdentifier , self . connectionTable [ successObject . peerIdentifier ] ) ; } ; thaliReplicationManager . on ( ThaliReplicationManager . events . CONNECTION_SUCCESS , this . connectionSuccessListener ) ; }
A temporary hack to collect connectionSuccess events. Once we put in ACLs we won't need this hack anymore.
@param thaliReplicationManager
@constructor
A temporary hack to collect connectionSuccess events . Once we put in ACLs we won t need this hack anymore .