Changeset 578 for trunk/sources
- Timestamp:
- 09/20/08 13:11:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid/ServerForm.cs
r401 r578 45 45 InitializeComponent(); 46 46 47 // windows XP returns the external ip on index 0 while windows vista returns the external ip on index 2 47 IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName()); 48 // windows XP returns the external ip on index 0 while windows vista returns the external ip on index 2 (presumably in the last entry, which normally is 2) 49 int index = 0; 48 50 if (System.Environment.OSVersion.Version.Major >= 6) { 49 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8000/Grid/Service"; 50 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8001/Grid/JobStore"; 51 } else { 52 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8000/Grid/Service"; 53 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore"; 51 index = addresses.Length - 1; 54 52 } 53 externalAddressTextBox.Text = "net.tcp://" + addresses[index] + ":8000/Grid/Service"; 54 internalAddressTextBox.Text = "net.tcp://" + addresses[index] + ":8001/Grid/JobStore"; 55 55 56 jobStore = new EngineStore(); 56 57 server = new GridServer(jobStore);
Note: See TracChangeset
for help on using the changeset viewer.