Changeset 13956 for branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
- Timestamp:
- 06/29/16 15:28:47 (8 years ago)
- Location:
- branches/thasling/DistributedGA/DistributedGA.Core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 DistributedGA.Core.csproj.user
-
- Property svn:ignore
-
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
r13947 r13956 24 24 private IContactService heartbeatClient; 25 25 26 public void Init(PeerInfo source, string contactServerUrl) { 26 private int communicationRate; //how many peers are contacted by this peer in percent 27 28 public void Init(PeerInfo source, string contactServerUrl, int communicationRate) { 27 29 serverString = contactServerUrl; 30 this.communicationRate = communicationRate; 28 31 myself = source; 29 32 //Init ChannelFactory and Clients … … 69 72 private List<PeerInfo> ChoosePeersForMessaging(List<PeerInfo> allPeers) { 70 73 //communicate with 10% of the network 71 int noOfPeers = allPeers.Count / 10;74 int noOfPeers = allPeers.Count / (100 /communicationRate); 72 75 List<int> indexList = GetRandomItemIndexes(noOfPeers, 0, allPeers.Count - 1); 73 76 List<PeerInfo> res = new List<PeerInfo>();
Note: See TracChangeset
for help on using the changeset viewer.