Beispiel #1
0
        public void RefreshMetaData(UInt32 torrentHandle)
        {
            PeerMetaData meta = new PeerMetaData();

            PeerMetaData.GetPeerMetaData((Int32)torrentHandle, Addr.Ip, Addr.Port, ref meta);

            DownloadRate               = meta.DlRate;
            UploadRate                 = meta.UlRate;
            PeerId                     = meta.PeerId;
            TotalBytesDownloaded       = meta.TotalBytesDownloaded;
            TotalBytesUploaded         = meta.TotalBytesUploaded;
            ConnectionLengthInSeconds  = meta.ConnectionLengthInSeconds;
            ConnectionFlags            = (ConnectionFlag)meta.ConnectionFlags;
            OustandingDownloadRequests = meta.OustandingDownloadRequests;
            OustandingUploadRequests   = meta.OustandingUploadRequests;
            PercentageDone             = meta.PercentageDone;
            AmChoking                  = meta.AmChoking;
            IsChokingMe                = meta.IsChokingMe;
            AmInterested               = meta.AmInterested;
            IsInterestedInMe           = meta.IsInterestedInMe;
        }
Beispiel #2
0
 public static extern bool GetPeerMetaData(Int32 torrentId, UInt32 peerIp, UInt16 peerPort, ref PeerMetaData meta);