Moved local ip to library

This commit is contained in:
2015-10-20 22:49:59 +02:00
parent d58e081bed
commit 85bcb0a2d4
-16
View File
@@ -55,22 +55,6 @@ namespace ErgometerServer
} }
} }
public static string GetIp()
{
IPHostEntry host;
string localIP = "?";
host = Dns.GetHostEntry(Dns.GetHostName());
foreach (IPAddress ip in host.AddressList)
{
if (ip.AddressFamily == AddressFamily.InterNetwork)
{
localIP = ip.ToString();
}
}
Console.WriteLine(localIP);
return localIP;
}
public void ChangeClientToDoctor(TcpClient client, ClientThread clth) public void ChangeClientToDoctor(TcpClient client, ClientThread clth)
{ {
clients.Remove(clth); clients.Remove(clth);