setSoTimeout() is a read timeout (which is also used when negotiating ssl,
if an SSLSocket).

from the javadoc:

"Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With
this option set to a non-zero timeout, a read() call on the InputStream
associated with this Socket will block for only this amount of time. If the
timeout expires, a *java.net.SocketTimeoutException* is raised, though the
Socket is still valid. The option *must* be enabled prior to entering the
blocking operation to have effect. The timeout must be > 0. A timeout of
zero is interpreted as an infinite timeout. "

for connection timeouts, you probably want to use Socket.connect(endpoint,
timeout):

"Connects this socket to the server with a specified timeout value. A
timeout of zero is interpreted as an infinite timeout. The connection will
then block until established or an error occurs."

Apache HttpClient, etc., should have params that let you control these
timeouts for HTTP/S requests.

2008/9/17 Nickname <[EMAIL PROTECTED]>

>
> *** please help ***
>
> On Sep 16, 10:32 am, Nickname <[EMAIL PROTECTED]> wrote:
> > How to control the length of time to time out a TCP connect() attempt?
> >
> > Socket.setSoTimeout() seems not working on connect().
> >
> > In my test, it takes 3 minutes for connect() to time out. That is not
> > acceptable to system redundancy!!!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to