예제 #1
0
 public string GetServerName(string hostOrIp)
 {
     if (Settings.Enabled && IPAddress.TryParse(hostOrIp, out var addr))
     {
         var nodes = GetNodesByIP(addr).ToList();
         if (nodes.Count == 1)
         {
             return(nodes[0].PrettyName);
         }
     }
     return(AddressCache.GetHostName(hostOrIp));
 }