W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2001

Re: Setting timeout in HttpURLConnection

From: Yves Lafon <ylafon@w3.org>
Date: Wed, 7 Mar 2001 18:48:26 +0100 (MET)
To: Ronen Lazar <RonenL@gilian.com>
cc: "'www-jigsaw@w3.org'" <www-jigsaw@w3.org>
Message-ID: <Pine.GSO.4.33.0103071844430.10264-100000@tarantula.inria.fr>
On Wed, 7 Mar 2001, Ronen Lazar wrote:

> Hi all,
>
> How can I control (set) the value of the blocking timeout for a HTTP request
> in HttpURLConnection?
> I'm looking for the effect similar to Socket.setSoTimeout (...).
>
> I tried to derive from the HttpURLConnection object and implement my own
> method like:
>
> 	public void setTimeout (int ms)
> 	{
> 		HttpManager.getManager().setTimeout (ms);
> 	}
>
> but it doesn't seem to do the job.

If you are using HttpManager, you have setTimeout(), which sets the
timeout on the socket, and setRequestTimeout(), a timeout on the whole
transaction.
See http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/www/protocol/http/HttpManager.html#setTimeout(int)
Regards,

-- 
Yves Lafon - W3C
"Baroula que barouleras, au tiéu toujou t'entourneras."
Received on Wednesday, 7 March 2001 12:48:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:35 GMT