Beispiel #1
0
        public async Task WarmUp(PeerApi initialPeer)
        {
            ActivePeer = initialPeer;
            await SetPeerList();

            ActivePeer = GetRandomPeer();
            StartPeerCleaningTask();
        }
Beispiel #2
0
 public async Task WarmUp()
 {
     foreach (var item in ArkNetApi.Instance.NetworkSettings.PeerSeedList)
     {
         var peer = new PeerApi(item);
         peers.Add(peer);
         if (ActivePeer == null && await peer.IsOnline())
         {
             ActivePeer = peer;
         }
     }
 }
Beispiel #3
0
        private bool WarmUp()
        {
            if (peers.Count > 0)
            {
                return(false);
            }
            foreach (var item in ArkNetApi.Instance.NetworkSettings.PeerSeedList)
            {
                peers.Add(new PeerApi(item));
            }

            ActivePeer = GetRandomPeer();
            return(true);
        }
Beispiel #4
0
 public void SwitchPeer()
 {
     ActivePeer = GetRandomPeer();
 }