开发者

AndroidHttpClient. How do I set KeepAlive strategy?

开发者 https://www.devze.com 2023-02-27 07:56 出处:网络
What would be syntax to do that. It\'s not DefaultHttpClient, it\'s AndroidHttpClient. I noticed some exceptions with broken pipes 开发者_C百科and I want to set connections to keep alive for 10-20 se

What would be syntax to do that. It's not DefaultHttpClient, it's AndroidHttpClient.

I noticed some exceptions with broken pipes 开发者_C百科and I want to set connections to keep alive for 10-20 seconds.


HttpParams httpParams = httpClient.getParams();
httpParams.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, <Timeout in milliseconds>);
0

精彩评论

暂无评论...
验证码 换一张
取 消