BitSharp.Network.Workers.HeadersRequestWorker.HeadersRequestWorker C# (CSharp) Method

HeadersRequestWorker() public method

public HeadersRequestWorker ( BitSharp.Common.WorkerConfig workerConfig, LocalClient localClient, BitSharp.Core.CoreDaemon coreDaemon ) : BitSharp.Common
workerConfig BitSharp.Common.WorkerConfig
localClient LocalClient
coreDaemon BitSharp.Core.CoreDaemon
return BitSharp.Common
        public HeadersRequestWorker(WorkerConfig workerConfig, LocalClient localClient, CoreDaemon coreDaemon)
            : base("HeadersRequestWorker", workerConfig.initialNotify, workerConfig.minIdleTime, workerConfig.maxIdleTime)
        {
            this.localClient = localClient;
            this.coreDaemon = coreDaemon;
            this.coreStorage = coreDaemon.CoreStorage;

            this.headersRequestsByPeer = new ConcurrentDictionary<Peer, DateTimeOffset>();

            this.localClient.OnBlockHeaders += HandleBlockHeaders;
            this.coreDaemon.OnTargetChainChanged += HandleTargetChainChanged;

            this.flushWorker = new WorkerMethod("HeadersRequestWorker.FlushWorker", FlushWorkerMethod, initialNotify: true, minIdleTime: TimeSpan.Zero, maxIdleTime: TimeSpan.MaxValue);
            this.flushQueue = new ConcurrentQueue<FlushHeaders>();
        }