this is how u do in httpclient 4.x.
HttpParams params = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(params, 2000);
HttpConnectionParams.setSoTimeout(params, 2000);
mHC = new DefaultHttpClient(params);
It seems u are using HttpClient3.x, Search for a posting by Megha on this
group on how to set timeouts in httpclient 3.x. I guess we are all supposed
to move to 4.x anywayz.
regards,
harsh
On Tue, Mar 25, 2008 at 10:26 PM, Raja Nagendra Kumar <
[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> We are using the code
>
> HttpClient client = new HttpClient();
> PostMethod method = new PostMethod(url.toString());
> method.addParameter(CommonConst.XML_REQUEST_PARAM_KEY, xmlRequest);
> method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
> new DefaultHttpMethodRetryHandler(3,
> false));
>
> for network access. However if the specified server is not up and
> running, the code is not throwing any exception and does not return.
>
> Is there a way to say timeout so that exception could be thrown..
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---