Changeset 765 for trunk/sources
- Timestamp:
- 11/15/08 20:19:52 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid/ServerForm.cs
r578 r765 46 46 47 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) 48 // windows XP returns the external ip on index 0 while windows vista returns the external ip as one of the last entries 49 // also if IPv6 protocol is installed we want to find an entry that is IPv4 49 50 int index = 0; 50 51 if (System.Environment.OSVersion.Version.Major >= 6) { 51 index = addresses.Length - 1; 52 for (index = addresses.Length - 1; index >= 0; index--) 53 if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) 54 break; 52 55 } 53 56 externalAddressTextBox.Text = "net.tcp://" + addresses[index] + ":8000/Grid/Service";
Note: See TracChangeset
for help on using the changeset viewer.