getHostName(). is there any way to set timeout??
Briefly, I have built a web application in which the user loads a .txt file with a bunch of ip addresses and I am trying to retrieve the host for each of them.
So my question is, when I call the getHostName() function, is there any way to set up a timeout so that it doesn't take too much time to retrieve the host? My experience is that when an ip has an unknown host, this method takes way too long to response and I want to control this. Let's say, by setting a limitation of 3 seconds.
I would be grateful to receive your thoughts and answers to that.
Thanks in advance,
Re: getHostName(). is there any way to set timeout??
Read this article: Simple handling of network timeouts - JavaWorld
I hope this answers your question.