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 {
92
92
private static final int DEFAULT_MAX_CONNECTIONS = 10 ;
93
93
private static final int DEFAULT_SOCKET_TIMEOUT = 10 * 1000 ;
94
94
private static final int DEFAULT_MAX_RETRIES = 5 ;
95
+ private static final int DEFAULT_SOCKET_BUFFER_SIZE = 8192 ;
95
96
private static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding" ;
96
97
private static final String ENCODING_GZIP = "gzip" ;
97
98
@@ -117,6 +118,7 @@ public AsyncHttpClient() {
117
118
118
119
HttpConnectionParams .setSoTimeout (httpParams , socketTimeout );
119
120
HttpConnectionParams .setTcpNoDelay (httpParams , true );
121
+ HttpConnectionParams .setSocketBufferSize (httpParams , DEFAULT_SOCKET_BUFFER_SIZE );
120
122
121
123
HttpProtocolParams .setVersion (httpParams , HttpVersion .HTTP_1_1 );
122
124
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