hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalit Sahoo" <lali...@sonata-software.com>
Subject RE: How to test Connection timeout
Date Fri, 08 Dec 2006 07:16:02 GMT
Hi Roland,

Thanks for the response.

I have tried the following code.

HttpClient httpclient = new HttpClient(connManager);
HttpClientParams clientParams = new HttpClientParams();
clientParams.setSoTimeout(1);
//clientParams.setConnectionManagerTimeout(1);
httpclient.setParams(clientParams);

When I am using clientParams.setSoTimeout(1); I am getting java.net.SocketTimeoutException:
Read timed out error.

I think it is not same as ConnectTimeoutException.

Also I have tried clientParams.setConnectionManagerTimeout(1);But in this case no exception
occurred.

Could you please give me more detail how to implement Connection TimeOut feature.

Regards,
Lalit 

-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net]
Sent: Friday, December 08, 2006 12:04 AM
To: HttpClient User Discussion
Subject: Re: How to test Connection timeout


Hello Lalit,

> I have used following code fragment in our implementation:
> 
> HttpConnectionManagerParams connParams = connManager.getParams();
> connParams.setConnectionTimeout(1);
> 
> But there is no time out happening.

Have you tried setting the timeout value at the method
or client parameters rather than at the connection manager?

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message