Just for info I've already tried this code :

/* * * * * * code * * * * * */
HttpConnectionParams.setConnectionTimeout(mParams, TIMEOUT);
HttpConnectionParams.setConnectionTimeout(mParams, TIMEOUT);
HttpConnectionParams.setSoTimeout(mParams, SOCKET_TIMEOUT);

On Jan 18, 9:57 am, lou <[email protected]> wrote:
> Hi !
> I'm developping an application using websocket ( socket on port 80 )
> in a service & activities which send some HTTP requests.
> I'm using a ThreadSafeClientConnManager and declarate it like this :
>
> /* * * * * * code * * * * * */
> mParams = new BasicHttpParams();
> mSchemeRegistry = new SchemeRegistry();
> mSchemeRegistry.register(new Scheme("http", new PlainSocketFactory(),
> 80));
> mSchemeRegistry.register(new Scheme("https",
> SSLSocketFactory.getSocketFactory(), 443));
>
> mCm = new ThreadSafeClientConnManager(mParams, mSchemeRegistry);
> mClient = new DefaultHttpClient(mCm, mParams);
>
> Everything's seems to do their job, but if I don't send an HTTP
> request after a while, when I tried to send it again, requests got 1
> or 2 SocketException timeout, and works again after this.
> I hope there's a answer to this problem.
> Thanks in advance.
> 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 [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