pub struct CongestionControlIntegrator { /* private fields */ }Expand description
Congestion control integration for connection migration
Implementations§
Source§impl CongestionControlIntegrator
impl CongestionControlIntegrator
Sourcepub fn new(config: CongestionIntegrationConfig) -> Self
pub fn new(config: CongestionIntegrationConfig) -> Self
Create a new congestion control integrator
Sourcepub async fn start_migration(
&self,
peer_id: PeerId,
old_path: SocketAddr,
new_path: SocketAddr,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn start_migration( &self, peer_id: PeerId, old_path: SocketAddr, new_path: SocketAddr, ) -> Result<(), Box<dyn Error + Send + Sync>>
Start connection migration with congestion awareness
Sourcepub async fn update_migration_state(
&self,
peer_id: PeerId,
new_state: MigrationState,
rtt: Option<Duration>,
bandwidth: Option<u64>,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn update_migration_state( &self, peer_id: PeerId, new_state: MigrationState, rtt: Option<Duration>, bandwidth: Option<u64>, ) -> Result<(), Box<dyn Error + Send + Sync>>
Update migration state based on congestion feedback
Sourcepub async fn record_congestion_event(
&self,
event_type: CongestionEventType,
severity: f64,
)
pub async fn record_congestion_event( &self, event_type: CongestionEventType, severity: f64, )
Record congestion event
Sourcepub async fn get_stats(&self) -> CongestionIntegrationStats
pub async fn get_stats(&self) -> CongestionIntegrationStats
Get congestion control integration statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CongestionControlIntegrator
impl RefUnwindSafe for CongestionControlIntegrator
impl Send for CongestionControlIntegrator
impl Sync for CongestionControlIntegrator
impl Unpin for CongestionControlIntegrator
impl UnwindSafe for CongestionControlIntegrator
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