Implemented Inet6AddressImpl.getHostByAddr().

This commit is contained in:
jfrijters 2010-09-09 06:19:51 +00:00
Родитель 48a8685daf
Коммит 9a1392464e
1 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -3799,7 +3799,22 @@ namespace IKVM.NativeCode.java
public static string getHostByAddr(object thisInet6AddressImpl, byte[] addr)
{
throw new NotImplementedException();
#if FIRST_PASS
return null;
#else
try
{
return System.Net.Dns.GetHostEntry(new System.Net.IPAddress(addr)).HostName;
}
catch (System.ArgumentException x)
{
throw new jnUnknownHostException(x.Message);
}
catch (System.Net.Sockets.SocketException x)
{
throw new jnUnknownHostException(x.Message);
}
#endif
}
public static bool isReachable0(object thisInet6AddressImpl, byte[] addr, int scope, int timeout, byte[] inf, int ttl, int if_scope)