/**
* Max number of pairs sent by the tracker to clients
*/
- public static int MAXIMUM_PAIRS = 50;
+ public static int MAXIMUM_PEERS = 50;
/**
* Interval of time where the peer should send a request to the tracker
*/
Msg.debug("My status is now " + getStatus());
//Sending the information to all the peers we are connected to
sendHave(message.index);
- //sending UNINTERSTED to peers that doesn't have what we want.
+ //sending UNINTERESTED to peers that doesn't have what we want.
updateInterestedAfterReceive();
}
else {
peerChoosed = null;
}
j++;
- } while (peerChoosed == null && j < Common.MAXIMUM_PAIRS);
+ } while (peerChoosed == null && j <
+Common.MAXIMUM_PEERS);
if (peerChoosed != null) {
activePeers.put(peerChoosed.id,peerChoosed);
peerChoosed.chokedUpload = false;
TrackerTask tTask = (TrackerTask)task;
//Sending peers to the peer
int nbPeers = 0;
- while (nbPeers < Common.MAXIMUM_PAIRS && nbPeers < peersList.size()) {
+ while (nbPeers < Common.MAXIMUM_PEERS && nbPeers < peersList.size()) {
int nextPeer;
do {
nextPeer = stream.randInt(0, peersList.size() - 1);