mirror of
https://github.com/curl/curl.git
synced 2026-07-31 22:28:03 +03:00
parent
f0f053fed0
commit
c124e6b3c0
10 changed files with 97 additions and 6 deletions
16
lib/multi.c
16
lib/multi.c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue