multi, signal network changed#17613
Conversation
|
But what if a user is doing many requests using a single handle with the easy interface and then changes network? |
Throw away the easy handle and make a new one, is probably the easiest way. Maybe do a SHARE with DNS caching one wants to keep that. The question is if we want a SHARE option in a similar way. But we can do that if someone really has use for it. |
c173bda to
40b9fce
Compare
|
It also struck me that alt-svc has a parameter to flush the entry on "network change", that we could look into having a bit for |
|
Thanks for the feedback! I believe we should make the value a bitmask with defines for CONN_REUSE, DNS and whatever else we might come up with. |
40b9fce to
d52fc5f
Compare
|
rebased, made the option value into a bitmask. |
|
please approved these changes, thank you! @bagder |
Since our feature window is closed for the release end of month, this will most likely become part of the September release. |
d52fc5f to
7d4b50e
Compare
A modified version of curl#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.
…persisted option.
7d4b50e to
dbe068b
Compare
A modified version of #17246 for signalling changes in network:
New multi option
CURLMOPT_NETWORK_CHANGEDwith 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.