示例#1
0
        private void StartNegotiator()
        {
            HandshakeNegotiatorHooks hooks = new HandshakeNegotiatorHooks
            {
                OnHandshakeCompleted = OnHandshakeCompleted
            };

            Negotiator =
                new HandshakeNegotiatorBuilder()
                .WithNetwork(Network)
                .Build(hooks);
        }
示例#2
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);
        }