thali/NextGeneration/mux/createPeerListener.js
function closeOldestServer() {
        var oldest = null;
        Object.keys(self._peerServers).forEach(function (k) {
          if (oldest == null) {
            oldest = k;
          }
          else {
            if (self._peerServers[k].lastActive <
              self._peerServers[oldest].lastActive) {
              oldest = k;
            }
          }
        });
        if (oldest) {
          closeServer(self, self._peerServers[oldest], null, false);
        }
      }
function closeOldestServer() {
        var oldest = null;
        Object.keys(self._peerServers).forEach(function (k) {
          if (oldest == null) {
            oldest = k;
          }
          else {
            if (self._peerServers[k].lastActive <
              self._peerServers[oldest].lastActive) {
              oldest = k;
            }
          }
        });
        if (oldest) {
          closeServer(self, self._peerServers[oldest], null, false);
        }
      }
function closeOldestServer ( ) { var oldest = null ; Object . keys ( self . _peerServers ) . forEach ( function ( k ) { if ( oldest == null ) { oldest = k ; } else { if ( self . _peerServers [ k ] . lastActive < self . _peerServers [ oldest ] . lastActive ) { oldest = k ; } } } ) ; if ( oldest ) { closeServer ( self , self . _peerServers [ oldest ] , null , false ) ; } }
This is the server that will listen for connection coming from the application
This is the server that will listen for connection coming from the application