hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Cianci <mcia...@axecibles.com>
Subject Re: timeout while waiting from reponse body ?
Date Thu, 12 Aug 2004 13:02:00 GMT
Thank you Oleg and excuse me for asking such questions.
I was searching with the TimeoutController class, and I've not seen the 
obvious answer.

Kalnichevski, Oleg a écrit :

>Setting socket timeout to a positive value will do the trick
>
>HttpClient client = new HttpClient();
>client.setTimeout(60000); // 60 sec timeout
>
>-----Original Message-----
>From: Mathias Cianci [mailto:mcianci@axecibles.com]
>Sent: Thursday, August 12, 2004 2:50 PM
>To: Commons HttpClient Project
>Subject: timeout while waiting from reponse body ?
>
>
>Hello everybody,
>
>Sometimes, when this code line is executed :
>byte[] responseBody = method.getResponseBody();
>my thread is blocked because the response is not coming.
>
>Is there a way to put something like a timeout in order to stop the
>
>thread after 1minute if  the response is not coming ?
>
>Hope an HttpClient-lover will give me an answer
>
>Mathias
>
>***************************************************************************************************
>The information in this email is confidential and may be legally privileged.  Access to
this email by anyone other than the intended addressee is unauthorized.  If you are not the
intended recipient of this message, any review, disclosure, copying, distribution, retention,
or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.
 If you are not the intended recipient, please reply to or forward a copy of this message
to the sender and delete the message, any attachments, and any copies thereof from your system.
>***************************************************************************************************
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
>
>
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message