Use hostname instead of the ip.

This commit is contained in:
Alexander Eckart authored and Florian Küpper committed 2013-12-26 13:07:23 +01:00
1 parent 3f28d6405c
commit d24551459f
1 file changed
+4 -2
+4 -2
View File
@@ -205,13 +205,15 @@ namespace ServerLib
public static string GetLocalAddress()
{
IPAddress[] ips = Dns.GetHostAddresses(Dns.GetHostName());
return Dns.GetHostName();
/*IPAddress[] ips = Dns.GetHostAddresses(Dns.GetHostName());
foreach (IPAddress ip in ips)
{
if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
return ip.ToString();
}
return "";
return "";*/
}
#region server control