pub struct Round {
pub haves_sent: usize,
pub in_vain: usize,
pub haves_to_send: usize,
pub previous_response_had_at_least_one_in_common: bool,
}
fetch
only.Expand description
Key information about each round in the pack-negotiation, as produced by one_round()
.
Fields§
§haves_sent: usize
The amount of HAVE
lines sent this round.
Each HAVE
is an object that we tell the server about which would acknowledge each one it has as well.
in_vain: usize
A total counter, over all previous rounds, indicating how many HAVE
s we sent without seeing a single acknowledgement,
i.e. the indication of a common object.
This number maybe zero or be lower compared to the previous round if we have received at least one acknowledgement.
haves_to_send: usize
The amount of haves we should send in this round.
If the value is lower than haves_sent
(the HAVE
lines actually sent), the negotiation algorithm has run out of options
which typically indicates the end of the negotiation phase.
previous_response_had_at_least_one_in_common: bool
If true
, the server reported, as response to our previous HAVE
s, that at least one of them is in common by acknowledging it.
This may also lead to the server responding with a pack.