Changeset 804
- Timestamp:
- 11/23/08 00:11:22 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r798 r804 35 35 using HeuristicLab.Hive.Contracts.BusinessObjects; 36 36 using HeuristicLab.Hive.Contracts; 37 using System.Runtime.Remoting.Messaging; 37 38 38 39 39 40 namespace HeuristicLab.Hive.Client.Core { 40 41 public class Core { 42 43 public delegate string GetASnapshotDelegate(); 41 44 42 45 Dictionary<long, Executor> engines = new Dictionary<long, Executor>(); … … 120 123 break; 121 124 case MessageContainer.MessageType.SnapshotReady: 122 engines[container.JobId].GetSnapshot(); 125 //Grabbing of the snapshot will need some time, so let's make this functun async 126 GetASnapshotDelegate ssd = new GetASnapshotDelegate(engines[container.JobId].GetSnapshot); 127 ssd.BeginInvoke(new AsyncCallback(SnapshotReceived), null); 128 //engines[container.JobId].GetSnapshot(); 123 129 break; 124 130 … … 138 144 break; 139 145 } 146 } 147 148 void SnapshotReceived(IAsyncResult res) { 149 AsyncResult ar = (AsyncResult) res; 150 GetASnapshotDelegate gss = (GetASnapshotDelegate) ar.AsyncDelegate; 151 String objectRepr = gss.EndInvoke(res); 140 152 } 141 153 -
trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs
r800 r804 119 119 120 120 public override void Run() { 121 string externalIP = 122 Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString(); 121 IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName()); 122 int index = 0; 123 if (System.Environment.OSVersion.Version.Major >= 6) { 124 for (index = addresses.Length - 1; index >= 0; index--) 125 if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) 126 break; 127 } 123 128 124 129 Uri uriTcp = 125 new Uri("net.tcp://" + externalIP+ ":" + port + "/HiveServer/");130 new Uri("net.tcp://" + addresses[index] + ":" + port + "/HiveServer/"); 126 131 127 132 ServiceHost clientCommunicator = … … 129 134 130 135 uriTcp = 131 new Uri("net.tcp://" + externalIP+ ":" + port + "/HiveServerConsole/");136 new Uri("net.tcp://" + addresses[index] + ":" + port + "/HiveServerConsole/"); 132 137 133 138 ServiceHost serverConsoleFacade =
Note: See TracChangeset
for help on using the changeset viewer.