예제 #1
0
 public ProcessingThread()
 {
     network = G2Network.Instance;
     cache = GHubCache.Instance;
     SearchManager = G2SearchManager.Instance;
     processThread = new Thread (new ThreadStart (Process));
     processThread.Name = "Processing Thread ";
 }
예제 #2
0
        public G2Manager(ProtocolPlugin proto)
        {
            protocol_ = proto;
            network = G2Network.Instance;
            searchManager = G2SearchManager.Instance;
            searchManager.ResultFind += new SearchResultHandler(SearchKeywordResult);

            searchResultRegroupingKeyword_ = new SearchResultRegroupingCollection();
        }
예제 #3
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));
        }
예제 #4
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));
        }