Skip to content

Commit

Permalink
Update congestion controller interface
Browse files Browse the repository at this point in the history
Surfaces timing information to the CC interface.
  • Loading branch information
sterlingdeng committed Sep 19, 2024
1 parent ead292b commit c98b93f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions quinn-proto/src/congestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ pub trait Controller: Send + Sync {
) {
}

#[allow(unused_variables)]
#[cfg(feature = "acktimestamps")]
/// Packet deliveries were confirmed with timestamps information.
fn on_ack_packet(
&mut self,
pn: u64,
now: Instant,
sent: Instant,
received: Option<Instant>,
bytes: u64,
app_limited: bool,
rtt: &RttEstimator,
) {
}

/// Packets are acked in batches, all with the same `now` argument. This indicates one of those batches has completed.
#[allow(unused_variables)]
fn on_end_acks(
Expand Down
3 changes: 3 additions & 0 deletions quinn-proto/src/connection/packet_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ impl PacketBuilder {
ack_eliciting,
retransmits: sent.retransmits,
stream_frames: sent.stream_frames,

#[cfg(feature = "acktimestamps")]
time_received: None,
};

conn.path
Expand Down

0 comments on commit c98b93f

Please sign in to comment.