http - Android DefaultHttpClient default timeout -
my questions default timeout requests made defaulthttpclient if didn't specify it.
so if don't have code this
httpparams my_httpparams = new basichttpparams(); httpconnectionparams.setconnectiontimeout(my_httpparams, 3000); httpconnectionparams.setsotimeout(my_httpparams, 1);
but
httpparams params = new basichttpparams(); httpprotocolparams.setcontentcharset(params, http.default_content_charset); clientconnectionmanager cm = new threadsafeclientconnmanager(params, schemeregistry); schemeregistry schemeregistry = new schemeregistry(); schemeregistry.register(new scheme("http", plainsocketfactory .getsocketfactory(), 80)); return new defaulthttpclient(cm, params);
how long httpclient wait response server?
as far know connection timeout , socket timeout defaulthttpclient both null (or zero) default, means timeouts not used , android application wait theoretically forever both connection , socket response complete. therefore, highly recommended provide new connection , socket timeouts when using defaulthttpclient.
Comments
Post a Comment