summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-04-30 11:14:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-01 22:51:23 +0200
commitbe6e281cf2792b06b6d413d120b4a9381e4b0653 (patch)
treea2b34a119ec3081931cb90720a3af68c3e1ec3b3 /lib/multi.c
parent5c8783d77f341d69e866bf0cd56836b4faea0a1f (diff)
downloadcurl-be6e281cf2792b06b6d413d120b4a9381e4b0653.tar.gz
multi: provide Curl_multiuse_state to update information
As soon as a TLS backend gets ALPN conformation about the specific HTTP version it can now set the multiplex situation for the "bundle" and trigger moving potentially queued up transfers to the CONNECT state.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 2d83e734e..41774337f 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2981,6 +2981,22 @@ size_t Curl_multi_max_total_connections(struct Curl_multi *multi)
return multi ? multi->max_total_connections : 0;
}
+/*
+ * When information about a connection has appeared, call this!
+ */
+
+void Curl_multiuse_state(struct connectdata *conn,
+ int bundlestate) /* use BUNDLE_* defines */
+{
+ DEBUGASSERT(conn);
+ DEBUGASSERT(conn->bundle);
+ DEBUGASSERT(conn->data);
+ DEBUGASSERT(conn->data->multi);
+
+ conn->bundle->multiuse = bundlestate;
+ process_pending_handles(conn->data->multi);
+}
+
static void process_pending_handles(struct Curl_multi *multi)
{
struct curl_llist_element *e = multi->pending.head;