public G2Manager(ProtocolPlugin proto) { protocol_ = proto; network = G2Network.Instance; searchManager = G2SearchManager.Instance; searchManager.ResultFind += new SearchResultHandler(SearchKeywordResult); searchResultRegroupingKeyword_ = new SearchResultRegroupingCollection(); }
public static void Main(string[] args) { Thread.CurrentThread.Name = "MAIN G2 thread"; ProtocolPlugin protocol = new ProtocolPlugin(Directory.GetCurrentDirectory(), "88.88.88.88"); protocol.NewResult += new SearchResultHandler(NewResult); protocol.Connect(); Thread.Sleep(10 * 1000); KeywordCollection coll = new KeywordCollection(); //coll.Add(new Keyword(protocol.GetProtocolName(), "phtc")); coll.Add(new Keyword(protocol.GetProtocolName(), "madonna")); protocol.SearchKeyword(new SearchTransaction("1", coll, 1, null)); Console.WriteLine("Sleeping ................................"); Console.Read(); }