lib: upgrade/multiplex handling

Improvements around HTTP Upgrade: and multiplex hanndling:

* add `Curl_conn_set_multiplex()` to set connection's multiplex
  bit and trigger "connchanged" events
* call `Curl_conn_set_multiplex()` in filters' `CF_CTRL_CONN_INFO_UPDATE`
  implementation where other connection properties are updated.
  This prevents connection updates before the final filter chain
  is chosen.
* rename enum `UPGR101_INIT` to `UPGR101_NONE`
* rename connection bit `asks_multiplex` to `upgrade_in_progress`
* trigger "connchanged" when `upgrade_in_progress` clears
* rename `WebSockets` to `WebSocket` as it is the common term
  used in documentation

Closes #18227
This commit is contained in:
Stefan Eissing 2025-08-08 12:15:25 +02:00 committed by Daniel Stenberg
parent 943166fed3
commit b3fc692568
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 90 additions and 65 deletions

View file

@ -621,3 +621,13 @@ out:
Curl_resolv_unlink(data, &data->state.dns[sockindex]);
return result;
}
void Curl_conn_set_multiplex(struct connectdata *conn)
{
if(!conn->bits.multiplex) {
conn->bits.multiplex = TRUE;
if(conn->attached_multi) {
Curl_multi_connchanged(conn->attached_multi);
}
}
}