katit
katit

Reputation: 17905

AndroidHttpClient. How do I set KeepAlive strategy?

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

I noticed some exceptions with broken pipes and I want to set connections to keep alive for 10-20 seconds.

Upvotes: 0

Views: 1013

Answers (1)

Naresh
Naresh

Reputation: 1336

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

Upvotes: 1

Related Questions