pub fn dial_client() -> Result<Client>Expand description
Build the reqwest client the upload/fetch paths dial with: rustls, a bounded
connect timeout, and the HTTP stack’s built-in Happy Eyeballs v2 at dial.
Racing happens at dial only (networking doc, “Connection racing at dial
only”). The parallel IPv6/IPv4 TCP race (RFC 8305) is provided for free by the
underlying hyper-util HttpConnector (a 300 ms fallback delay between the
preferred and fallback address families), which both reqwest (this client)
and tonic (the sync channel) sit on — so this module does not re-implement address
racing. What this constructor does add is the bounded connect timeout and the
standing guarantee that Capsule never races whole requests across paths
(which would double server load): there is no per-request fan-out anywhere in
the SDK; a request rides exactly one dialed connection.