From 007f8b8f6bf9c9f92d9fdf7863d2542f59f86d4a Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Fri, 13 Jun 2025 13:05:18 +0200 Subject: [PATCH] CI made me do the documentation as well --- docs/libcurl/curl_multi_setopt.md | 4 ++ docs/libcurl/opts/CURLMOPT_NETWORK_CHANGED.md | 70 +++++++++++++++++++ docs/libcurl/opts/CURLOPT_FORBID_REUSE.md | 1 + docs/libcurl/opts/CURLOPT_FRESH_CONNECT.md | 1 + docs/libcurl/opts/Makefile.inc | 1 + 5 files changed, 77 insertions(+) create mode 100644 docs/libcurl/opts/CURLMOPT_NETWORK_CHANGED.md diff --git a/docs/libcurl/curl_multi_setopt.md b/docs/libcurl/curl_multi_setopt.md index 55cc11beac..e646eced62 100644 --- a/docs/libcurl/curl_multi_setopt.md +++ b/docs/libcurl/curl_multi_setopt.md @@ -68,6 +68,10 @@ CURLMOPT_MAX_HOST_CONNECTIONS(3) Max simultaneously open connections. See CURLMOPT_MAX_TOTAL_CONNECTIONS(3) +## CURLMOPT_NETWORK_CHANGED + +Signal that the network has changed. See CURLMOPT_NETWORK_CHANGED(3) + ## CURLMOPT_PIPELINING Enable HTTP multiplexing. See CURLMOPT_PIPELINING(3) diff --git a/docs/libcurl/opts/CURLMOPT_NETWORK_CHANGED.md b/docs/libcurl/opts/CURLMOPT_NETWORK_CHANGED.md new file mode 100644 index 0000000000..296bcd4c72 --- /dev/null +++ b/docs/libcurl/opts/CURLMOPT_NETWORK_CHANGED.md @@ -0,0 +1,70 @@ +--- +c: Copyright (C) Daniel Stenberg, , et al. +SPDX-License-Identifier: curl +Title: CURLMOPT_NETWORK_CHANGED +Section: 3 +Source: libcurl +See-also: + - CURLOPT_FRESH_CONNECT (3) + - CURLOPT_FORBID_REUSE (3) +Protocol: + - All +Added-in: 8.15.0 +--- + +# NAME + +CURLMOPT_NETWORK_CHANGED - signal network changed + +# SYNOPSIS + +~~~c +#include + +CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_NETWORK_CHANGED, + long value); +~~~ + +# DESCRIPTION + +Pass a long for **value**. The set number determines how the multi +handle should adapt to a change in the network. + +`1`: do not reuse any existing connection in the multi's connection cache. +This will close all connections that are not in use. Ongoing transfers +will continue on the connections they operate on. + +`2`: in addition to `1` also clear the multi's DNS cache. + +This option can be set at any time and repeatedly. Any connection created or +DNS information cached afterwards is considered fresh again. + +This affects only the connection and DNS cache of the multi handle and +not the ones owned by SHARE handles. + +# DEFAULT + +0, which means that there was no change. + +# %PROTOCOLS% + +# EXAMPLE + +~~~c +int main(void) +{ + CURLM *m = curl_multi_init(); + /* do transfers on the multi handle */ + /* do not reuse existing connections */ + curl_multi_setopt(m, CURLMOPT_NETWORK_CHANGED, 1L); +} +~~~ + +# %AVAILABILITY% + +# RETURN VALUE + +curl_multi_setopt(3) returns a CURLMcode indicating success or error. + +CURLM_OK (0) means everything was OK, non-zero means an error occurred, see +libcurl-errors(3). diff --git a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.md b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.md index 3fdcadc76b..729dcdc702 100644 --- a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.md +++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.md @@ -8,6 +8,7 @@ See-also: - CURLOPT_FRESH_CONNECT (3) - CURLOPT_MAXCONNECTS (3) - CURLOPT_MAXLIFETIME_CONN (3) + - CURLMOPT_NETWORK_CHANGED (3) Protocol: - All Added-in: 7.7 diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.md b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.md index a466b6938d..0198a344f4 100644 --- a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.md +++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.md @@ -10,6 +10,7 @@ See-also: - CURLOPT_FORBID_REUSE (3) - CURLOPT_MAXAGE_CONN (3) - CURLOPT_MAXLIFETIME_CONN (3) + - CURLMOPT_NETWORK_CHANGED (3) Added-in: 7.7 --- diff --git a/docs/libcurl/opts/Makefile.inc b/docs/libcurl/opts/Makefile.inc index d62d369a66..1cf960e5ee 100644 --- a/docs/libcurl/opts/Makefile.inc +++ b/docs/libcurl/opts/Makefile.inc @@ -108,6 +108,7 @@ man_MANS = \ CURLMOPT_MAX_PIPELINE_LENGTH.3 \ CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ CURLMOPT_MAXCONNECTS.3 \ + CURLMOPT_NETWORK_CHANGED.3 \ CURLMOPT_PIPELINING.3 \ CURLMOPT_PIPELINING_SERVER_BL.3 \ CURLMOPT_PIPELINING_SITE_BL.3 \