You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Saminda Abeyruwan <sa...@opensource.lk> on 2006/06/30 09:41:33 UTC
SO_TIMEOUT Question
-----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));
If so,
1. Do i have to do setHttpConnectionManager() before doing
getHttpConnectionManager() to the httpclient object.
2. If i put "0" as the input, does the so_timeout set for infinity.
Thank you
Saminda
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEpNWsYmklbLuW6wYRAh08AJ4pGX5lphlm7EUzOzU4bXkVCYzxOACgixkc
QwFI84oHGgCaztW2fsnOsKQ=
=ydUo
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
Re: SO_TIMEOUT Question
Posted by Ortwin Glück <od...@odi.ch>.
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