Skip to main content

Module http

Module http 

Source

Structs§

HttpClient
HTTP transport for fetching control files and byte ranges.
HttpRangeReader

Enums§

HttpError

Constants§

CONNECT_TIMEOUT
Cap on establishing a connection, covering the TCP handshake and TLS setup but never the transfer that follows.
DEFAULT_RANGE_GAP_THRESHOLD
Default gap threshold for range merging (256 KiB, same as zsync2).
RESOLVE_TIMEOUT
Cap on the DNS lookup, for the same reason as CONNECT_TIMEOUT.

Functions§

byte_ranges_from_block_ranges
merge_byte_ranges
Merge byte ranges to minimize HTTP requests. Gaps smaller than the threshold are merged to save HTTP round-trips.