p2p/network.js
function sumOnLinePeers() {
	let nowTime = Date.now();
	assocOnlinePeers = {};
	Object.keys(assocAllOutBoundPeers).forEach(function(curUrl){    
		var curPeers = assocAllOutBoundPeers[curUrl];   
		if(nowTime - parseInt(curPeers.time) < 3 * 60 * 1000){
			for (var j=0; j<curPeers.peers.length; j++){
                if(assocOnlinePeers[curPeers.peers[j]]) 
					assocOnlinePeers[curPeers.peers[j]]++;
				else
					assocOnlinePeers[curPeers.peers[j]] = 1;
            }
		}       
    }); 
}
function sumOnLinePeers() {
	let nowTime = Date.now();
	assocOnlinePeers = {};
	Object.keys(assocAllOutBoundPeers).forEach(function(curUrl){    
		var curPeers = assocAllOutBoundPeers[curUrl];   
		if(nowTime - parseInt(curPeers.time) < 3 * 60 * 1000){
			for (var j=0; j<curPeers.peers.length; j++){
                if(assocOnlinePeers[curPeers.peers[j]]) 
					assocOnlinePeers[curPeers.peers[j]]++;
				else
					assocOnlinePeers[curPeers.peers[j]] = 1;
            }
		}       
    }); 
}
function sumOnLinePeers ( ) { let nowTime = Date . now ( ) ; assocOnlinePeers = { } ; Object . keys ( assocAllOutBoundPeers ) . forEach ( function ( curUrl ) { var curPeers = assocAllOutBoundPeers [ curUrl ] ; if ( nowTime - parseInt ( curPeers . time ) < 3 * 60 * 1000 ) { for ( var j = 0 ; j < curPeers . peers . length ; j ++ ) { if ( assocOnlinePeers [ curPeers . peers [ j ] ] ) assocOnlinePeers [ curPeers . peers [ j ] ] ++ ; else assocOnlinePeers [ curPeers . peers [ j ] ] = 1 ; } } } ) ; }
Summary online peers
Summary online peers