hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <...@odi.ch>
Subject Re: SO_TIMEOUT Question
Date Fri, 30 Jun 2006 07:50:00 GMT


Saminda Abeyruwan wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Devs,
> 
> Is the following code,
> 
> httpClient.getHttpConnectionManager().getParams().setSoTimeout(soTimeout);
> 
> is same as
> 
> httpclient.getParams().setParameter("http.socket.timeout", new
> Integer(soTimeout));

Yes.

> If so,
> 
> 1. Do i have to do setHttpConnectionManager() before doing
> getHttpConnectionManager() to the httpclient object.

No. HttpClient will the default connection manager for you if not 
overriden in the constructor.

See
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/params/HttpClientParams.html#CONNECTION_MANAGER_CLASS

> 2. If i put "0" as the input, does the so_timeout set for infinity.

Yes. See 
http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int)

> Thank you
> 
> Saminda

YAW

Ortwin

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


Mime
View raw message