コード例 #1
0
        public G2SearchResults(SearchTransaction transaction, GUID guid)
        {
            SearchManager = G2SearchManager.Instance;
            ACKPacket = new List<G2PacketQA>();
            Transaction = transaction;
            SearchGUID = guid;
            TotalFiles = 0;
            SharedTotalFiles = 0;
            PeersBrowsed = new HashSet<Peer>();

            SearchedWord = transaction.Keywords[0].KeywordName;
            Buffer = new PacketBuffer();
            SearchRegrouping = new G2SearchResultRegrouping(transaction, 0, false);
            ContinueRegrouping = true;
            StartSearchTime = DateTime.Now;
            StopSearchTimer = new System.Timers.Timer((double)Settings.SEARCH_TIME_OUT_MS);
            StopSearchTimer.AutoReset = false;
            StopSearchTimer.Elapsed += new ElapsedEventHandler(SearchTimeOut);

            RegroupingThread = new Thread(new ThreadStart(SearchResultThread));
        }
コード例 #2
0
 /**
  * Simply set all to null so the Garbage Manager will collect it
  * */
 public void Clean()
 {
     Buffer = null;
     this.SearchRegrouping = null;
     this.PeersBrowsed.Clear();
     this.PeersBrowsed = null;
     this.ACKPacket.Clear();
     this.ACKPacket = null;
 }