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.
This commit is contained in:
Daniel Stenberg 2019-04-30 11:14:38 +02:00
parent 5c8783d77f
commit be6e281cf2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 48 additions and 2 deletions

View file

@ -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;