use of cz.msebera.android.httpclient.conn.params.ConnPerRouteBean in project android-async-http by loopj.
the class AsyncHttpClient method setMaxConnections.
/**
* Sets maximum limit of parallel connections
*
* @param maxConnections maximum parallel connections, must be at least 1
*/
public void setMaxConnections(int maxConnections) {
if (maxConnections < 1)
maxConnections = DEFAULT_MAX_CONNECTIONS;
this.maxConnections = maxConnections;
final HttpParams httpParams = this.httpClient.getParams();
ConnManagerParams.setMaxConnectionsPerRoute(httpParams, new ConnPerRouteBean(this.maxConnections));
}
Aggregations