全部发生,
我遇到以下问题:
当我试图通过MonoTorrent库获取torrent中的每个同伴的下载速度时,它只是重新调整零。我得到了每个同行的下载速度:
foreach (PeerId p in manager.GetPeers())
{
nTorrentPeerStatus pStatus = new nTorrentPeerStatus();
pStatus.Url = p.Peer.ConnectionUri.ToString();
pStatus.DownloadSpeed = Math.Round(p.Monitor.DownloadSpeed/1024.0, 2);
pStatus.UploadSpeed = Math.Round(p.Monitor.UploadSpeed/1024.0, 2);
pStatus.RequestingPieces = p.AmRequestingPiecesCount;
s.PeerStatuses.Add(pStatus);
}
这总是为向下和上传速度返回零。但是当我在其中一条线上放置一个断点时,它们会返回零以外的东西吗?那么有人知道为什么当我放置一个断点并在继续之前等待几秒钟而不是一次性获得所有下载和上传速度时它能起作用吗?