Пример #1
0
        private WaitHandle Scrape(Tracker tracker, bool trySubsequent)
        {
            if (tracker == null)
            {
                throw new ArgumentNullException("tracker");
            }

            if (!tracker.CanScrape)
            {
                throw new TorrentException("This tracker does not support scraping");
            }

            TrackerConnectionID id = new TrackerConnectionID(tracker, trySubsequent, TorrentEvent.None, new ManualResetEvent(false));

            tracker.Scrape(new ScrapeParameters(this.infoHash), id);
            return(id.WaitHandle);
        }