Ignore:
Timestamp:
01/19/16 09:49:35 (5 years ago)
Author:
thasling
Message:

changed a few method names and other refactoring

File:
1 edited

Legend:

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

    r13548 r13553  
    4343        host = new WcfMessageService();
    4444        ownInstance.Port = host.Init(ownInstance.IpAddress); //getting port, on which service is hostet
    45         host.OnPopulationRecieved += new EventHandler<MessageRecieveEventArgs>(OnPopulationRecieved);
     45        host.OnDataRecieved += new EventHandler<MessageRecieveEventArgs>(OnPopulationRecieved);
    4646
    4747        peerListManager = new WcfPeerListManager();
     
    6565    }
    6666
    67     public void PublishMigrationInfo(SolutionInfo[] population) {
     67    public void PublishDataToNetwork(SolutionInfo[] data) {
    6868      try {
    6969        foreach (PeerInfo peer in peerListManager.GetPeerList()) {
    7070          //HACK: manipulate for monitoring in test
    71           foreach (SolutionInfo si in population) {
     71          foreach (SolutionInfo si in data) {
    7272            si.IterationNumber = ownInstance.Port;
    7373          }
    7474          //maybe something will go wrong during network communication...
    7575          try {
    76             sender.SendPopulation(peer, population);
     76            sender.SendData(peer, data);
    7777          } catch (Exception ex) {
    7878            AddError("PeerNetworkMessageHandler.PublishMigrationInfo(during sending to one peer!)", ex);
     
    8484    }
    8585
    86     public SolutionInfo[] GetMigrationInfo() {
     86    public SolutionInfo[] GetDataFromNetwork() {
    8787      try {
    8888        List<SolutionInfo> res = new List<SolutionInfo>();
     
    131131      if (e != null) {
    132132        lock (activeQueueLocker) {
    133           foreach (SolutionInfo si in e.Population) {
     133          foreach (SolutionInfo si in e.data) {
    134134            writeQueue.Enqueue(si);
    135135          }
Note: See TracChangeset for help on using the changeset viewer.