fix minor ClientNetworkManager and ServerNetworkManager

This commit is contained in:
Lev 2024-08-18 13:23:31 +03:00
parent a69f133d0a
commit 593f53fc47
2 changed files with 5 additions and 5 deletions

View file

@ -98,8 +98,8 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
public static IPAddress GetIp() public static IPAddress GetIp()
{ {
string hostName = Dns.GetHostName(); // Retrive the Name of HOST string hostName = Dns.GetHostName(); // Retrive the Name of HOST
string myIP = Dns.GetHostByName(hostName).AddressList[1].ToString();// Get the IP //string myIP = Dns.GetHostByName(hostName).AddressList[1].ToString();// Get the IP
return IPAddress.Parse(myIP); return IPAddress.Parse("127.0.0.1");
} }
//поток 2 //поток 2

View file

@ -54,9 +54,9 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
public static IPAddress GetIp() public static IPAddress GetIp()
{ {
string hostName = Dns.GetHostName(); // Retrive the Name of HOST string hostName = Dns.GetHostName(); // Retrive the Name of HOST
var ipList =Dns.GetHostByName(hostName).AddressList; //var ipList =Dns.GetHostByName(hostName).AddressList;
string myIP = ipList[ipList.Count()-1].ToString();// Get the IP //string myIP = ipList[ipList.Count()-1].ToString();// Get the IP
return IPAddress.Parse(myIP); return IPAddress.Parse("127.0.0.1");
} }
/// <summary> /// <summary>