mirror of
https://github.com/curl/curl.git
synced 2026-07-30 05:08:07 +03:00
multi: add CURLMOPT_NETWORK_CHANGED to signal network changed
New multi option CURLMOPT_NETWORK_CHANGED with a long bitmask value: - CURLM_NWCOPT_CLEAR_CONNS: do not reuse existing connections, close all idle connections. - CURLM_NWCOPT_CLEAR_DNS: clear the multi's DNS cache. All other bits reserved for future extensions. Fixes #17225 Reported-by: ウさん Closes #17613
This commit is contained in:
parent
7b8594176d
commit
55c045c863
19 changed files with 354 additions and 4 deletions
|
|
@ -395,9 +395,23 @@ typedef enum {
|
|||
/* maximum number of concurrent streams to support on a connection */
|
||||
CURLOPT(CURLMOPT_MAX_CONCURRENT_STREAMS, CURLOPTTYPE_LONG, 16),
|
||||
|
||||
/* network has changed, adjust caches/connection reuse */
|
||||
CURLOPT(CURLMOPT_NETWORK_CHANGED, CURLOPTTYPE_LONG, 17),
|
||||
|
||||
CURLMOPT_LASTENTRY /* the last unused */
|
||||
} CURLMoption;
|
||||
|
||||
/* Definition of bits for the CURLMOPT_NETWORK_CHANGED argument: */
|
||||
|
||||
/* - CURLM_NWCOPT_CLEAR_CONNS tells libcurl to prevent further reuse
|
||||
of existing connections. Connections that are idle will be closed.
|
||||
Ongoing transfers will continue with the connection they have. */
|
||||
#define CURLM_NWCOPT_CLEAR_CONNS (1L<<0)
|
||||
|
||||
/* - CURLM_NWCOPT_CLEAR_DNS tells libcurl to prevent further reuse
|
||||
of existing connections. Connections that are idle will be closed.
|
||||
Ongoing transfers will continue with the connection they have. */
|
||||
#define CURLM_NWCOPT_CLEAR_DNS (1L<<0)
|
||||
|
||||
/*
|
||||
* Name: curl_multi_setopt()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue