aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes sloowwwww  Reverse DNS lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "sloowwwww  Reverse DNS lookup" Watch "sloowwwww  Reverse DNS lookup" New topic
Author

sloowwwww Reverse DNS lookup

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Here is my simple code:


I understand that there is no guarantee that this will return a proper host name. For some ip addresses, this takes a ridiculously long time to return, often with just the same ip address I put in. Other ip addresses are faster. Meanwhile, netstat from the command line returns all IP addresses instantly.

So I have three questions:
1) InetAddress API says that it uses a "System Configured lookup setting" to resolve the ip address to a host name. what settting would this be?
2) Why do some ip addresses take longer than others?
3) How does netstat get this same information so much faster?

I am loking through the SIGAR code for their netstat implementation and it just uses something similar to what I put above.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sloowwwww Reverse DNS lookup
 
Similar Threads
inetaddress dns?
RMI Binding on localhost
Why does RMI naming lookup work on the local host when I give it a garbage name?
is RMI this slow????
Using ip address in place of localhost