aboutsummaryrefslogtreecommitdiff
path: root/vendor/curl/curl_multi.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-12-04 14:58:45 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-12-04 14:58:45 +0100
commit6ef91e26588fb3985eaa521c86d2ce2dcb2eabf1 (patch)
tree67b98dc117f6d799f3ac8fb2b8cdedf8a1226051 /vendor/curl/curl_multi.odin
parentbe943e97576e844e2e38ba3dc1d2741052fc254d (diff)
Update curl bindings to 8.17dev-2025-12a
Diffstat (limited to 'vendor/curl/curl_multi.odin')
-rw-r--r--vendor/curl/curl_multi.odin70
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/curl/curl_multi.odin b/vendor/curl/curl_multi.odin
index fa7cbf51f..860c8dbc1 100644
--- a/vendor/curl/curl_multi.odin
+++ b/vendor/curl/curl_multi.odin
@@ -332,8 +332,50 @@ Moption :: enum c.int {
/* maximum number of concurrent streams to support on a connection */
MAX_CONCURRENT_STREAMS = OPTTYPE_LONG + 16,
+
+ /* network has changed, adjust caches/connection reuse */
+ NETWORK_CHANGED = OPTTYPE_LONG + 17,
+
+ /* This is the notify callback function pointer */
+ NOTIFYFUNCTION = OPTTYPE_FUNCTIONPOINT + 18,
+
+ /* This is the argument passed to the notify callback */
+ NOTIFYDATA = OPTTYPE_OBJECTPOINT + 19,
}
+/* Definition of bits for the CURLMOPT_NETWORK_CHANGED argument: */
+
+/* - CURLMNWC_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. */
+MNWC_CLEAR_CONNS :: 1 << 0
+
+/* - CURLMNWC_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. */
+MNWC_CLEAR_DNS :: 1 << 0
+
+Minfo :: enum c.int {
+ /* first, never use this */
+ NONE = 0,
+ /* The number of easy handles currently managed by the multi handle,
+ * e.g. have been added but not yet removed. */
+ XFERS_CURRENT = 1,
+ /* The number of easy handles running, e.g. not done and not queueing. */
+ XFERS_RUNNING = 2,
+ /* The number of easy handles waiting to start, e.g. for a connection
+ * to become available due to limits on parallelism, max connections
+ * or other factors. */
+ INFO_XFERS_PENDING = 3,
+ /* The number of easy handles finished, waiting for their results to
+ * be read via `curl_multi_info_read()`. */
+ XFERS_DONE = 4,
+ /* The total number of easy handles added to the multi handle, ever. */
+ XFERS_ADDED = 5,
+
+ /* the last unused */
+ LASTENTRY,
+}
@(default_calling_convention="c", link_prefix="curl_")
foreign lib {
@@ -370,6 +412,34 @@ foreign lib {
*/
multi_get_handles :: proc(multi_handle: ^CURLM) -> ^^CURL ---
+ /*
+ * Name: curl_multi_get_offt()
+ *
+ * Desc: Retrieves a numeric value for the `CURLMINFO_*` enums.
+ *
+ * Returns: CULRM_OK or error when value could not be obtained.
+ */
+ multi_get_offt :: proc(multi_handle: ^CURLM, info: Minfo, value: ^off_t) -> Mcode ---
+}
+
+
+/*
+ * Notifications dispatched by a multi handle, when enabled.
+ */
+MULTI_NOTIFY :: enum c.uint {
+ INFO_READ = 0,
+ EASY_DONE = 1,
+}
+
+/*
+ * Callback to install via CURLMOPT_NOTIFYFUNCTION.
+ */
+curl_notify_function :: #type proc "c" (multi_handle: ^CURLM, notification: MULTI_NOTIFY, easy: ^CURL, user_data: rawptr)
+
+@(default_calling_convention="c", link_prefix="curl_")
+foreign lib {
+ multi_notify_disable :: proc(multi: ^CURLM, notification: MULTI_NOTIFY) -> Mcode ---
+ multi_notify_enable :: proc(multi: ^CURLM, notification: MULTI_NOTIFY) -> Mcode ---
}
/*