summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/multi.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2019-11-08 10:55:37 +0300
committerdartraiden <wowemuh@gmail.com>2019-11-08 10:55:37 +0300
commit72d615e38510b5a0da501db32c8260daacee0104 (patch)
tree2034f84c9d9a4ca5a2396d923bf151985aff1dbb /libs/libcurl/src/multi.c
parent4da5039cd9bed18e59e298f8972f967e99a9149d (diff)
libcurl: update to 7.67
Diffstat (limited to 'libs/libcurl/src/multi.c')
-rw-r--r--libs/libcurl/src/multi.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/libcurl/src/multi.c b/libs/libcurl/src/multi.c
index 2e91e4ff35..6dfe8842e7 100644
--- a/libs/libcurl/src/multi.c
+++ b/libs/libcurl/src/multi.c
@@ -363,7 +363,7 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
Curl_llist_init(&multi->msglist, NULL);
Curl_llist_init(&multi->pending, NULL);
- multi->multiplexing = CURLPIPE_MULTIPLEX;
+ multi->multiplexing = TRUE;
/* -1 means it not set by user, use the default value */
multi->maxconnects = -1;
@@ -2772,6 +2772,16 @@ CURLMcode curl_multi_setopt(struct Curl_multi *multi,
break;
case CURLMOPT_PIPELINING_SERVER_BL:
break;
+ case CURLMOPT_MAX_CONCURRENT_STREAMS:
+ {
+ long streams = va_arg(param, long);
+ if(streams < 1)
+ streams = 100;
+ multi->max_concurrent_streams =
+ (streams > (long)INITIAL_MAX_CONCURRENT_STREAMS)?
+ (long)INITIAL_MAX_CONCURRENT_STREAMS : streams;
+ }
+ break;
default:
res = CURLM_UNKNOWN_OPTION;
break;
@@ -3210,3 +3220,9 @@ void Curl_multi_dump(struct Curl_multi *multi)
}
}
#endif
+
+size_t Curl_multi_max_concurrent_streams(struct Curl_multi *multi)
+{
+ return multi ? ((size_t)multi->max_concurrent_streams ?
+ (size_t)multi->max_concurrent_streams : 100) : 0;
+}