Results 1 to 2 of 2
- 10-04-2011, 03:35 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 1
- Rep Power
- 0
getHostName(). is there any way to set timeout??
Hi all,
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,
Nick
- 10-05-2011, 06: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.
Regards Serb.
Similar Threads
-
Implement a timeout
By pjmorce in forum Advanced JavaReplies: 5Last Post: 04-27-2010, 02:36 AM -
Java RMI timeout
By sky in forum Advanced JavaReplies: 0Last Post: 03-17-2010, 12:44 AM -
Socket Timeout?
By Moncleared in forum New To JavaReplies: 1Last Post: 09-12-2009, 04:12 AM -
session timeout
By nmbalaji in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 12-12-2008, 04:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks