New info, I think the timeout is only when I'm connected with Wifi,
not in 3G or edge !
Is it possible ? What can I do ?
Thanks.

On Jan 7, 6:33 pm, lou <louis.coq...@wopata.com> wrote:
> Thanks for your answer,
> And yes, I've already tried to modify these parameters, but I think it
> don't change anything, even when the server really don't respond.
> So...another idea?
>
> On Jan 7, 6:09 pm, ivan <istas...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Have you tried playing with the timeouts passed via the http params?
>
> > HttpParams httpParameters = new BasicHttpParams();
> > ConnManagerParams.setMaxTotalConnections(httpParameters,
> > inApp.gResources.getInteger(R.integer.HTTP_MaxConnCnt));
> > HttpConnectionParams.setConnectionTimeout(httpParameters, 20000); //
> > Set the timeout in milliseconds until a connection is established.
> > HttpConnectionParams.setSoTimeout(httpParameters, 30000); // Set the
> > default socket timeout (SO_TIMEOUT) in milliseconds which is the
> > timeout for waiting for data.
>
> > On Jan 7, 9:29 am, lou <louis.coq...@wopata.com> wrote:
>
> > > Hi !
> > > I'm actually trying to do an application with a websocket persistent
> > > connexion & some http request. So I thank I need to use
> > > ThreadSafeConnectionManager, but I have a big problem with it : very
> > > very often I got a "java.net.SocketException: The operation timed out"
> > > even when the server's responding.
> > > My code :
> > > // class members declarations
> > > private static HttpParams mParams;
> > > private static SchemeRegistry mSchemeRegistry;
> > > private static ClientConnectionManager mCm;
> > > private static HttpClient mClient;
>
> > > // code used to initiate the HttpClient
> > > mParams = new BasicHttpParams();
> > > mSchemeRegistry = new SchemeRegistry();
> > > mSchemeRegistry.register(new Scheme("http",
> > > PlainSocketFactory.getSocketFactory(), 80));
> > > mCm = new ThreadSafeClientConnManager(mParams, mSchemeRegistry);
> > > mClient = new DefaultHttpClient(mCm, mParams);
>
> > > What am I doing wrong?
> > > Thanks a lot.
> > > Louis C.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to