Example #1
0
        /// <inheritdoc />
        public Task StartAsync()
        {
            log.Debug("Starting");

            foreach (var protocol in protocols)
            {
                Swarm.AddProtocol(protocol);
            }
            Swarm.ConnectionEstablished += Swarm_ConnectionEstablished;

            return(Task.CompletedTask);
        }
Example #2
0
        /// <inheritdoc />
        public Task StartAsync()
        {
            log.Debug("Starting");

            RoutingTable  = new RoutingTable(Swarm.LocalPeer);
            ContentRouter = new ContentRouter();
            Swarm.AddProtocol(this);
            Swarm.PeerDiscovered += Swarm_PeerDiscovered;
            foreach (var peer in Swarm.KnownPeers)
            {
                RoutingTable.Add(peer);
            }

            return(Task.CompletedTask);
        }
Example #3
0
        /// <inheritdoc />
        public Task StartAsync()
        {
            log.Debug("Starting");

            foreach (var protocol in Protocols)
            {
                Swarm.AddProtocol(protocol);
            }
            Swarm.ConnectionEstablished += Swarm_ConnectionEstablished;

            // TODO: clear the stats.
            peerLedgers.Clear();

            return(Task.CompletedTask);
        }