private void updatePeerStats(){
  int activePeers=0;
  int connectablePeers=0;
  for (  Peer peer : peerList) {
    if (peer.isHasSentData() || peer.hasReceivedData()) {
      activePeers++;
    }
    if (peer.hasReceivedData()) {
      connectablePeers++;
    }
  }
  float ratio=(float)connectablePeers / (float)activePeers;
  mConnectablePeers.setText(String.valueOf(connectablePeers));
  mActivePeers.setText(String.valueOf(activePeers));
  mConnectableRatio.setText(String.valueOf(ratio));
}

private void updatePeerStats ( ) { int activePeers = 0 ; int connectablePeers = 0 ; for ( Peer peer : peerList ) { if ( peer . isHasSentData ( ) || peer . hasReceivedData ( ) ) { activePeers ++ ; } if ( peer . hasReceivedData ( ) ) { connectablePeers ++ ; } } float ratio = ( float ) connectablePeers / ( float ) activePeers ; mConnectablePeers . setText ( String . valueOf ( connectablePeers ) ) ; mActivePeers . setText ( String . valueOf ( activePeers ) ) ; mConnectableRatio . setText ( String . valueOf ( ratio ) ) ; }
update the connection stats of thee peers .
