connection: clarify transport

The `transport` to use for a transfer, e.g. TCP/QUIC/UNIX/UDP, is
initially selected by options and protocol used. This is set at the
`struct connectdata` as `transport` member.

During connection establishment, this transport may change due to
Alt-Svc or Happy-Eyeballing. Most common is the switch from TCP to QUIC.

Rename the connection member to `transport_wanted` and add a way to
query the connection for the transport in use via a new connection
filter query.

The filter query can also be used in the happy eyeballing attempts when
code needs to know which transport is used by the "filter below". This
happens in wolfssl initialization, as one example.

Closes #17923
This commit is contained in:
Stefan Eissing 2025-07-14 11:41:59 +02:00 committed by Daniel Stenberg
parent 674ad27f77
commit e9ae1bd404
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
16 changed files with 84 additions and 30 deletions

View file

@ -1515,7 +1515,8 @@ CURLcode Curl_conn_setup(struct Curl_easy *data,
/* Still no cfilter set, apply default. */
if(!conn->cfilter[sockindex]) {
result = cf_setup_add(data, conn, sockindex, conn->transport, ssl_mode);
result = cf_setup_add(data, conn, sockindex,
conn->transport_wanted, ssl_mode);
if(result)
goto out;
}