Ejemplo n.º 1
0
 public static void Seed2Queue(
     UrlAddressQueue urlQueue,
     SpiderSetting setting)
 {
     if (setting.Seeds != null && urlQueue != null)
     {
         var c = setting.Seeds.GetSeeds();
         foreach (var i in c)
         {
             urlQueue.EnQueue(new UrlInfo(i, 0));
         }
     }
 }
Ejemplo n.º 2
0
 public SpiderWorker(UrlAddressQueue queue)
 {
     AddressQueue = queue;
 }
Ejemplo n.º 3
0
 public SpiderMaster()
 {
     urlQueue    = new UrlAddressQueue();
     urlPool     = new UrlAddressPool();
 }
Ejemplo n.º 4
0
 public SpiderWorkerList(UrlAddressQueue queue)
 {
     AddressQueue = queue;
 }
Ejemplo n.º 5
0
 public SpiderThreadWorker(UrlAddressQueue queue)
     :base(queue)
 {
     InnerThread = new Thread(new ThreadStart(ThreadProc));
 }