Skip to main content

Module hyper_client

Module hyper_client 

Source
Expand description

Direct hyper HTTP client for the hot download path.

Bypasses reqwest overhead for simple HTTP range GETs by using hyper’s Client with a tuned HttpConnector. The connector enables hyper’s built-in Happy Eyeballs racing (set_happy_eyeballs_timeout) so IPv6/IPv4 connects are raced with a 250ms IPv6 head start, matching the behaviour of crate::http::happy_eyeballs::connect_happy_eyeballs.

For proxy / complex-auth / HTTPS-with-custom-TLS paths, reqwest is still used (see client_pool.rs and connection.rs); this module does NOT remove reqwest.

§TODO (future work)

  • Implement a custom hyper::service::Service connector that delegates to crate::http::happy_eyeballs::connect_happy_eyeballs for full control over the dual-stack race (including custom DNS via hickory-resolver).
  • Wire HyperDirectClient::download_range into HttpSegmentDownloader::download_range when no proxy is configured (the “hot path”).

Structs§

HyperDirectClient
A lightweight HTTP client using hyper directly.