mirror of
https://github.com/zhangkong828/DHTSpider.git
synced 2026-10-19 05:21:33 +08:00
33 lines
765 B
C#
33 lines
765 B
C#
using Spider;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SimpleClient
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
var spider = SpiderConfiguration.Create(new SpiderSetting()
|
|
{
|
|
LocalPort = 6881,
|
|
IsSaveTorrent = true,
|
|
TorrentSavePath = "",
|
|
MaxSpiderThreadCount = 2,
|
|
MaxDownLoadThreadCount = 10
|
|
})
|
|
.UseDefaultCache()
|
|
.UseDefaultQueue()
|
|
//.UseRedisQueue()
|
|
//.UseElasticSearchStore()
|
|
.UseMongoDBStore()
|
|
.Start();
|
|
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|