Exemple #1
0
 public void peer_PieceFinished(bool isActive, Peer peer, int pieceId)
 {
     // check all peers we are interested in to see if we should turn off interest now we have a new piece.
     if (!DownloadStrategyHelp.DoesPeerHavePieceWeDont(mManager, peer))
     {
         peer.AmIInterested = false;
     }
 }
Exemple #2
0
        public void peer_PieceFinished(bool isActive, Peer peer, int pieceId)
        {
            if (isActive)
            {
                this.CheckForEndGame();
                this.StartDownloadingNextPieceIfPossible(peer);

                // check all peers we are interested in to see if we should turn off interest now we have a new piece.
                foreach (Peer ipeer in this.mManager.Torrent.Peers)
                {
                    if (!DownloadStrategyHelp.DoesPeerHavePieceWeDont(mManager, ipeer))
                    {
                        ipeer.AmIInterested = false;
                    }
                }
            }
        }