更新时间:2023-12-02 17:24:04
public string GetComputerName(string clientIP)
{
try
{
var hostEntry = Dns.GetHostEntry(clientIP);
return hostEntry.HostName;
}
catch (Exception ex)
{
return string.Empty;
}
}