Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/13/16 19:13:03 (8 years ago)
Author:
thasling
Message:

#2615:
PeerList is now recieved each 10 seconds instead of 20 seconds
PeerList is also recieved at Init-Call for the first time
changed data type of some parameters of P2PMigrationAnalyzer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs

    r14060 r14061  
    66using DistributedGA.Core.Interface;
    77using System.Timers;
     8using System.Threading.Tasks;
    89
    910namespace DistributedGA.Core.Implementation {
     
    3031      cachedPeerList = new List<PeerInfo>();
    3132      rand = new Random();
     33      //Init
     34      Task.Factory.StartNew(() => RefreshPeerList(this, null), TaskCreationOptions.LongRunning);
    3235      //Start heartbeat timer
    33       timer = new Timer(1000 * 20); //each 20 seconds
     36      timer = new Timer(1000 * 10); //each 10 seconds
    3437      timer.Elapsed += RefreshPeerList;
    3538      timer.Start();
     
    4548      using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) {
    4649        using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) {
    47           ((IContactService)client).MakeLog(myself, msg);     
     50          ((IContactService)client).MakeLog(myself, msg);
    4851        }
    4952      }
     
    8386          using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) {
    8487            using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) {
    85               allPeers = ((IContactService)client).GetPeerList(myself);           
     88              allPeers = ((IContactService)client).GetPeerList(myself);
    8689            }
    8790          }
Note: See TracChangeset for help on using the changeset viewer.