コード例 #1
0
ファイル: TrackerFactory.cs プロジェクト: vnvizitiu/leak
        public void Start(TrackerGetHooks hooks)
        {
            lock (this)
            {
                if (pipeline == null)
                {
                    pipeline = new LeakPipeline();
                    pipeline.Start();
                }

                if (worker == null)
                {
                    worker = new CompletionThread();
                    worker.Start();
                }

                if (service == null)
                {
                    service =
                        new TrackerGetBuilder()
                        .WithPipeline(pipeline)
                        .WithWorker(worker)
                        .Build(hooks);

                    service.Start();
                }
            }
        }
コード例 #2
0
        public RepositoryFixture()
        {
            pipeline = new LeakPipeline();
            pipeline.Start();

            completion = new CompletionThread();
            completion.Start();

            files = new FileFactory(completion);
        }
コード例 #3
0
        public void Stop()
        {
            lock (this)
            {
                if (worker != null)
                {
                    worker.Dispose();
                    worker = null;
                }

                if (pipeline != null)
                {
                    pipeline?.Stop();
                    pipeline = null;
                }
            }
        }
コード例 #4
0
ファイル: ConnectorFixture.cs プロジェクト: vnvizitiu/leak
        public ConnectorFixture()
        {
            pipeline = new LeakPipeline();
            pipeline.Start();

            worker = new CompletionThread();
            worker.Start();

            pool =
                new NetworkPoolBuilder()
                .WithPipeline(pipeline)
                .WithWorker(worker)
                .WithMemory(new ConnectorMemory())
                .Build();

            pool.Start();

            hooks = new PeerConnectorHooks();
        }
コード例 #5
0
        public LoopFixture()
        {
            pipeline = new LeakPipeline();
            pipeline.Start();

            worker = new CompletionThread();
            worker.Start();

            pool =
                new NetworkPoolBuilder()
                .WithPipeline(pipeline)
                .WithWorker(worker)
                .WithMemory(new LoopMemory())
                .Build();

            pool.Start();

            hooks   = new ReceiverHooks();
            samples = new LoopSamples();
        }
コード例 #6
0
        public void Start()
        {
            lock (this)
            {
                if (pipeline == null)
                {
                    pipeline = new LeakPipeline();
                    pipeline.Start();
                }

                if (worker == null)
                {
                    worker = new CompletionThread();
                    worker.Start();
                }

                if (files == null)
                {
                    files = new FileFactory(worker);
                }
            }
        }
コード例 #7
0
        public NegotiatorFixture()
        {
            pipeline = new LeakPipeline();
            pipeline.Start();

            worker = new CompletionThread();
            worker.Start();

            pool =
                new NetworkPoolBuilder()
                .WithPipeline(pipeline)
                .WithWorker(worker)
                .WithMemory(new NegotiatorMemory())
                .Build();

            pool.Start();

            hooks      = new HandshakeNegotiatorHooks();
            negotiator =
                new HandshakeNegotiatorBuilder()
                .WithNetwork(pool)
                .Build(hooks);
        }
コード例 #8
0
 public PeersFixture()
 {
     pipeline = new LeakPipeline();
     pipeline.Start();
 }
コード例 #9
0
ファイル: MetadataFixture.cs プロジェクト: vnvizitiu/leak
 public MetadataFixture()
 {
     pipeline = new LeakPipeline();
     pipeline.Start();
 }