File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/com/loopj/android/http Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ public class AsyncHttpClient {
9292 private static final int DEFAULT_MAX_CONNECTIONS = 10 ;
9393 private static final int DEFAULT_SOCKET_TIMEOUT = 10 * 1000 ;
9494 private static final int DEFAULT_MAX_RETRIES = 5 ;
95+ private static final int DEFAULT_SOCKET_BUFFER_SIZE = 8192 ;
9596 private static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding" ;
9697 private static final String ENCODING_GZIP = "gzip" ;
9798
@@ -117,6 +118,7 @@ public AsyncHttpClient() {
117118
118119 HttpConnectionParams .setSoTimeout (httpParams , socketTimeout );
119120 HttpConnectionParams .setTcpNoDelay (httpParams , true );
121+ HttpConnectionParams .setSocketBufferSize (httpParams , DEFAULT_SOCKET_BUFFER_SIZE );
120122
121123 HttpProtocolParams .setVersion (httpParams , HttpVersion .HTTP_1_1 );
122124 HttpProtocolParams .setUserAgent (httpParams , String .format ("android-async-http/%s (http://loopj.com/android-async-http)" , VERSION ));
You can’t perform that action at this time.
0 commit comments