multi, signal network changed

A modified version of #17246 for signalling changes in network:

New multi option `CURLMOPT_NETWORK_CHANGED` with a long value:
0 - does nothing
1 - do not reuse existing connections
2 - as 1, but also clear DNS cache

One could also make the long a bitmask, if people want more control.

Documentation to be added if this gets the vote to go forward.
This commit is contained in:
Stefan Eissing 2025-06-13 12:38:44 +02:00
parent 7b8594176d
commit b1e6bae277
No known key found for this signature in database
14 changed files with 257 additions and 4 deletions

View file

@ -395,6 +395,9 @@ 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;