mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
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:
parent
674ad27f77
commit
e9ae1bd404
16 changed files with 84 additions and 30 deletions
|
|
@ -1065,7 +1065,8 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data,
|
|||
/* step 2, create a socket for the requested address */
|
||||
error = 0;
|
||||
for(ai = res; ai; ai = ai->ai_next) {
|
||||
if(Curl_socket_open(data, ai, NULL, conn->transport, &portsock)) {
|
||||
if(Curl_socket_open(data, ai, NULL,
|
||||
Curl_conn_get_transport(data, conn), &portsock)) {
|
||||
error = SOCKERRNO;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue