commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7618] - need a way to set time out when using HttpClient and HttpMultiClient
Date Sun, 12 May 2002 15:09:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7618>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7618

need a way to set time out when using HttpClient and HttpMultiClient





------- Additional Comments From svante@nemesis.se  2002-05-12 15:09 -------
Nah... cannot subclass HttpClient, since "connection" is declared as private
(why not protected???)

Rather I _copied_ HttpClient, and added this method:

void setTimeout(int ms)
{
  if ( connection == null )
  {
    return;
  }
  try
  {
    connection.setSoTimeout(ms);
  }
  catch (SocketException ex) { ex.printStackTrace(); }
}

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message