pub struct PathRecord {
pub rtt_us: u64,
pub min_rtt_us: u64,
pub cwnd: u64,
pub congestion_events: u64,
pub lost_packets: u64,
pub lost_bytes: u64,
pub sent_packets: u64,
pub current_mtu: u64,
pub tx_datagrams: u64,
pub tx_bytes: u64,
pub rx_datagrams: u64,
pub rx_bytes: u64,
}Expand description
One REPORT record: the sender’s view of the QUIC path under the
connection (docs/PROTOCOL.md §6.10,
decisions/0036
§4.5). Numbers only; no address travels. A key the peer did not send
reads as 0, and the encoder writes only the non-zero ones.
Fields§
§rtt_us: u64Smoothed round-trip time, µs (key 0).
min_rtt_us: u64Smallest round-trip time seen, µs (key 1).
cwnd: u64Congestion window, bytes (key 2).
congestion_events: u64Congestion events the sender’s controller reacted to (key 3).
lost_packets: u64Packets the sender sent and declared lost (key 4).
lost_bytes: u64Bytes the sender sent and declared lost (key 5).
sent_packets: u64Packets the sender sent (key 6).
current_mtu: u64The largest UDP payload the path carries now (key 7).
tx_datagrams: u64UDP datagrams the sender sent (key 8).
tx_bytes: u64Bytes in them (key 9).
rx_datagrams: u64UDP datagrams the sender received (key 10).
rx_bytes: u64Bytes in them (key 11).
Implementations§
Source§impl PathRecord
impl PathRecord
Sourcepub fn encode_into(&self, out: &mut Vec<u8>)
pub fn encode_into(&self, out: &mut Vec<u8>)
Appends [varint length][CBOR map] to out. Twelve keys of at most
nine bytes each stay far below limits::MAX_PATH_RECORD_BYTES.
Sourcepub fn decode(input: &[u8]) -> Result<Option<(PathRecord, usize)>, HeaderError>
pub fn decode(input: &[u8]) -> Result<Option<(PathRecord, usize)>, HeaderError>
Decodes one record from the front of input.
Ok(None) means the input ends inside a record: read more bytes and
retry, which is bounded because a record is at most
limits::MAX_PATH_RECORD_BYTES bytes plus its prefix; at FIN the
same answer is a truncated record and a violation. A length prefix
above the cap is refused before any of the map is read.