Results 1 to 2 of 2
  1. #1
    nikmanutd is offline Member
    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0

    Default 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

  2. #2
    Join Date
    Jul 2011
    Posts
    30
    Rep Power
    0

    Default 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

  1. Implement a timeout
    By pjmorce in forum Advanced Java
    Replies: 5
    Last Post: 04-27-2010, 03:36 AM
  2. Java RMI timeout
    By sky in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2010, 01:44 AM
  3. Socket Timeout?
    By Moncleared in forum New To Java
    Replies: 1
    Last Post: 09-12-2009, 05:12 AM
  4. session timeout
    By nmbalaji in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 12-12-2008, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •