Results 1 to 2 of 2
- 10-04-2011, 04:35 AM #1Member
- Join Date
- Oct 2011
- Rep Power
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,
- 10-05-2011, 07:09 PM #2
Re: getHostName(). is there any way to set timeout??
Read this article: Simple handling of network timeouts - JavaWorld
I hope this answers your question.
- By pjmorce in forum Advanced JavaReplies: 5Last Post: 04-27-2010, 03:36 AM
- By sky in forum Advanced JavaReplies: 0Last Post: 03-17-2010, 01:44 AM
- By Moncleared in forum New To JavaReplies: 1Last Post: 09-12-2009, 05:12 AM
- By nmbalaji in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 12-12-2008, 05:04 PM