コード例 #1
0
ファイル: ConnectorFixture.cs プロジェクト: vnvizitiu/leak
        public ConnectorSession Start()
        {
            PeerConnector connector =
                new PeerConnectorBuilder()
                .WithPipeline(pipeline)
                .WithNetwork(pool)
                .Build(hooks);

            connector.Start();

            return(new ConnectorSession(pool, connector));
        }
コード例 #2
0
        private void StartConnector()
        {
            PeerConnectorHooks hooks = new PeerConnectorHooks
            {
                OnConnectionEstablished = OnConnectionEstablished
            };

            Connector =
                new PeerConnectorBuilder()
                .WithNetwork(Network)
                .WithPipeline(Pipeline)
                .Build(hooks);

            Connector.Start();
        }