Struct s2n_quic_core::path::ecn::Controller
source · pub struct Controller { /* private fields */ }
Implementations§
source§impl Controller
impl Controller
sourcepub fn restart<Pub: ConnectionPublisher>(
&mut self,
path: Path<'_>,
publisher: &mut Pub
)
pub fn restart<Pub: ConnectionPublisher>( &mut self, path: Path<'_>, publisher: &mut Pub )
Restart testing of ECN capability
sourcepub fn on_timeout<Pub: ConnectionPublisher>(
&mut self,
now: Timestamp,
path: Path<'_>,
random_generator: &mut dyn Generator,
rtt: Duration,
publisher: &mut Pub
)
pub fn on_timeout<Pub: ConnectionPublisher>( &mut self, now: Timestamp, path: Path<'_>, random_generator: &mut dyn Generator, rtt: Duration, publisher: &mut Pub )
Called when the connection timer expires
sourcepub fn ecn(
&mut self,
transmission_mode: Mode,
now: Timestamp
) -> ExplicitCongestionNotification
pub fn ecn( &mut self, transmission_mode: Mode, now: Timestamp ) -> ExplicitCongestionNotification
Gets the ECN marking to use on packets sent to the peer
sourcepub fn is_capable(&self) -> bool
pub fn is_capable(&self) -> bool
Returns true if the path has been determined to be capable of handling ECN marked packets
sourcepub fn validate<Pub: ConnectionPublisher>(
&mut self,
newly_acked_ecn_counts: EcnCounts,
sent_packet_ecn_counts: EcnCounts,
baseline_ecn_counts: EcnCounts,
ack_frame_ecn_counts: Option<EcnCounts>,
now: Timestamp,
rtt: Duration,
path: Path<'_>,
publisher: &mut Pub
) -> ValidationOutcome
pub fn validate<Pub: ConnectionPublisher>( &mut self, newly_acked_ecn_counts: EcnCounts, sent_packet_ecn_counts: EcnCounts, baseline_ecn_counts: EcnCounts, ack_frame_ecn_counts: Option<EcnCounts>, now: Timestamp, rtt: Duration, path: Path<'_>, publisher: &mut Pub ) -> ValidationOutcome
Validate the given EcnCounts
, updating the current validation state based on the
validation outcome.
newly_acked_ecn_counts
- total ECN counts that were sent on packets newly acknowledged by the peersent_packet_ecn_counts
- total ECN counts for all outstanding packets, including those newly acknowledged during this validationbaseline_ecn_counts
- the ECN counts present in the Ack frame the last time ECN counts were processedack_frame_ecn_counts
- the ECN counts present in the current Ack frame (if any)now
- the time the Ack frame was received
sourcepub fn on_packet_sent<Pub: ConnectionPublisher>(
&mut self,
ecn: ExplicitCongestionNotification,
path: Path<'_>,
publisher: &mut Pub
)
pub fn on_packet_sent<Pub: ConnectionPublisher>( &mut self, ecn: ExplicitCongestionNotification, path: Path<'_>, publisher: &mut Pub )
This method gets called when a packet has been sent
sourcepub fn on_packet_ack(
&mut self,
time_sent: Timestamp,
ecn: ExplicitCongestionNotification
)
pub fn on_packet_ack( &mut self, time_sent: Timestamp, ecn: ExplicitCongestionNotification )
This method gets called when a packet delivery got acknowledged
sourcepub fn on_packet_loss<Pub: ConnectionPublisher>(
&mut self,
time_sent: Timestamp,
ecn: ExplicitCongestionNotification,
now: Timestamp,
path: Path<'_>,
publisher: &mut Pub
)
pub fn on_packet_loss<Pub: ConnectionPublisher>( &mut self, time_sent: Timestamp, ecn: ExplicitCongestionNotification, now: Timestamp, path: Path<'_>, publisher: &mut Pub )
This method gets called when a packet loss is reported
Trait Implementations§
source§impl Clone for Controller
impl Clone for Controller
source§fn clone(&self) -> Controller
fn clone(&self) -> Controller
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Controller
impl Debug for Controller
source§impl Default for Controller
impl Default for Controller
source§fn default() -> Controller
fn default() -> Controller
Returns the “default value” for a type. Read more
source§impl Provider for Controller
impl Provider for Controller
source§fn timers<Q: Query>(&self, query: &mut Q) -> Result
fn timers<Q: Query>(&self, query: &mut Q) -> Result
Notifies the query of any timers owned by the provider Read more
source§fn next_expiration(&self) -> Option<Timestamp>
fn next_expiration(&self) -> Option<Timestamp>
Returns the next
Timestamp
at which the earliest timer is armed in the providersource§fn armed_timer_count(&self) -> usize
fn armed_timer_count(&self) -> usize
Counts the number of armed timers in the provider
Auto Trait Implementations§
impl Freeze for Controller
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more