Timeout in android httpclient

原文: http://www.cnblogs.com/codingmyworld/archive/2011/08/17/2141706.html

 

/* 从连接池中取连接的超时时间 */
ConnManagerParams.setTimeout(params, 1000);
/* 连接超时 */
HttpConnectionParams.setConnectionTimeout(params, 2000);
/* 请求超时 */
HttpConnectionParams.setSoTimeout(params, 4000);

Java学习总结之第十六章 Socket用法详解

http://www.cnblogs.com/jerrychoi/archive/2010/04/15/1712931.html

 

HTTP 协议详解
http://www.cnblogs.com/TankXiao/archive/2012/02/13/2342672.html

Keep-Alive不会永久保持连接,它有一个保持时间,可以在不同的服务器软件(如Apache)中设定这个时间

 

Fiddler 教程
http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.html

 

HttpClient修改处理策略Strategy

http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.html

 

Interface ConnectionKeepAliveStrategy

Interface for deciding how long a connection can remain idle before being reused.

Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.

http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html

http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/200908.mbox/%3C20090804093036.GA12342@ok2cons2.nine.ch%3E

posted @ 2014-06-18 15:11  xiaokang088  阅读(275)  评论(0编辑  收藏  举报