private bool _valid_ip(string ip)
{
try
{
/*res = socket.getaddrinfo(ip, 0, socket.AF_UNSPEC,
socket.SOCK_STREAM,
0, socket.AI_NUMERICHOST)*/
var res = Dns.GetHostEntry(ip);
return (res != null);
}
catch(SocketException e)
{
//todo what code is this?? if e.args[0] == socket.EAI_NONAME:
// return False
throw;
}
return true;
}
}