- Timestamp:
- 04/08/08 14:49:16 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.Grid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid/ClientForm.cs
r114 r115 58 58 59 59 private void startButton_Click(object sender, EventArgs e) { 60 //clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8002/Grid/Client";61 60 string hostname = Dns.GetHostName(); 62 61 IPAddress[] addresses = Dns.GetHostAddresses(hostname); 63 62 64 // Thanks to Microsoft63 // windows XP returns the external ip on index 0 while windows vista returns the external ip on index 2 65 64 if (System.Environment.OSVersion.Version.Major >= 6) { 66 65 clientUrl = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":" + clientPort.Text +"/Grid/Client"; -
trunk/sources/HeuristicLab.Grid/ServerForm.cs
r114 r115 44 44 InitializeComponent(); 45 45 46 // Thanks to Microsoft46 // windows XP returns the external ip on index 0 while windows vista returns the external ip on index 2 47 47 if (System.Environment.OSVersion.Version.Major >= 6) { 48 48 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8000/Grid/Service"; 49 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8001/Grid/JobStore"; 49 50 } else { 50 51 externalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8000/Grid/Service"; 51 }52 if (System.Environment.OSVersion.Version.Major >= 6) {53 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[2] + ":8001/Grid/JobStore";54 } else {55 52 internalAddressTextBox.Text = "net.tcp://" + Dns.GetHostAddresses(Dns.GetHostName())[0] + ":8001/Grid/JobStore"; 56 53 }
Note: See TracChangeset
for help on using the changeset viewer.