Struct s2n_quic_core::path::mtu::Controller
source · pub struct Controller { /* private fields */ }
Implementations§
source§impl Controller
impl Controller
sourcepub fn new(max_mtu: MaxMtu, peer_socket_address: &SocketAddress) -> Self
pub fn new(max_mtu: MaxMtu, peer_socket_address: &SocketAddress) -> Self
Construct a new mtu::Controller with the given max_mtu
and peer_socket_address
The UDP header length and IP header length will be subtracted from max_mtu
to
determine the max_udp_payload used for limiting the payload length of probe packets.
max_mtu is the maximum allowed mtu, e.g. for jumbo frames this value is expected to
be over 9000.
sourcepub fn on_timeout(&mut self, now: Timestamp)
pub fn on_timeout(&mut self, now: Timestamp)
Called when the connection timer expires
sourcepub fn on_packet_ack<CC: CongestionController, Pub: ConnectionPublisher>(
&mut self,
packet_number: PacketNumber,
sent_bytes: u16,
congestion_controller: &mut CC,
path_id: Id,
publisher: &mut Pub
)
pub fn on_packet_ack<CC: CongestionController, Pub: ConnectionPublisher>( &mut self, packet_number: PacketNumber, sent_bytes: u16, congestion_controller: &mut CC, path_id: Id, publisher: &mut Pub )
This method gets called when a packet delivery got acknowledged
sourcepub fn on_packet_loss<CC: CongestionController, Pub: ConnectionPublisher>(
&mut self,
packet_number: PacketNumber,
lost_bytes: u16,
new_loss_burst: bool,
now: Timestamp,
congestion_controller: &mut CC,
path_id: Id,
publisher: &mut Pub
)
pub fn on_packet_loss<CC: CongestionController, Pub: ConnectionPublisher>( &mut self, packet_number: PacketNumber, lost_bytes: u16, new_loss_burst: bool, now: Timestamp, congestion_controller: &mut CC, path_id: Id, publisher: &mut Pub )
This method gets called when a packet loss is reported
sourcepub fn mtu(&self) -> usize
pub fn mtu(&self) -> usize
Gets the currently validated maximum transmission unit, not including IP or UDP header len
sourcepub fn probed_sized(&self) -> usize
pub fn probed_sized(&self) -> usize
Gets the MTU currently being probed for
Trait Implementations§
source§impl Clone for Controller
impl Clone for Controller
source§fn clone(&self) -> Controller
fn clone(&self) -> Controller
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Controller
impl Debug for Controller
source§impl Provider for Controller
impl Provider for Controller
source§fn on_transmit<W: Writer>(&mut self, context: &mut W)
fn on_transmit<W: Writer>(&mut self, context: &mut W)
Queries the component for any outgoing frames that need to get sent
This method assumes that no other data (other than the packet header) has been written
to the supplied WriteContext
. This necessitates the caller ensuring the probe packet
written by this method to be in its own connection transmission.
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
source§fn next_expiration(&self) -> Option<Timestamp>
fn next_expiration(&self) -> Option<Timestamp>
Timestamp
at which the earliest timer is armed in the provider