Search in sources :

Example 6 with HttpParams

use of cz.msebera.android.httpclient.params.HttpParams in project android-async-http by loopj.

the class AsyncHttpClient method setResponseTimeout.

/**
     * Set response timeout limit (milliseconds). By default, this is set to
     * 10 seconds.
     *
     * @param value Response timeout in milliseconds, minimal value is 1000 (1 second).
     */
public void setResponseTimeout(int value) {
    responseTimeout = value < 1000 ? DEFAULT_SOCKET_TIMEOUT : value;
    final HttpParams httpParams = httpClient.getParams();
    HttpConnectionParams.setSoTimeout(httpParams, responseTimeout);
}
Also used : HttpParams(cz.msebera.android.httpclient.params.HttpParams) BasicHttpParams(cz.msebera.android.httpclient.params.BasicHttpParams)

Aggregations

HttpParams (cz.msebera.android.httpclient.params.HttpParams)6 BasicHttpParams (cz.msebera.android.httpclient.params.BasicHttpParams)5 HttpHost (cz.msebera.android.httpclient.HttpHost)2 Header (cz.msebera.android.httpclient.Header)1 HttpRequest (cz.msebera.android.httpclient.HttpRequest)1 ProtocolException (cz.msebera.android.httpclient.ProtocolException)1 CircularRedirectException (cz.msebera.android.httpclient.client.CircularRedirectException)1 ClientConnectionManager (cz.msebera.android.httpclient.conn.ClientConnectionManager)1 ConnPerRouteBean (cz.msebera.android.httpclient.conn.params.ConnPerRouteBean)1 Scheme (cz.msebera.android.httpclient.conn.scheme.Scheme)1 SchemeRegistry (cz.msebera.android.httpclient.conn.scheme.SchemeRegistry)1 SSLSocketFactory (cz.msebera.android.httpclient.conn.ssl.SSLSocketFactory)1 DefaultHttpClient (cz.msebera.android.httpclient.impl.client.DefaultHttpClient)1 RedirectLocations (cz.msebera.android.httpclient.impl.client.RedirectLocations)1 ThreadSafeClientConnManager (cz.msebera.android.httpclient.impl.conn.tsccm.ThreadSafeClientConnManager)1 IOException (java.io.IOException)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 KeyManagementException (java.security.KeyManagementException)1 KeyStoreException (java.security.KeyStoreException)1