pub struct Cubic { /* private fields */ }展开描述
RFC 8312 拥塞控制器,与 TCP 中广泛使用的实现一致
实现§
trait 实现§
源代码§impl Controller for Cubic
impl Controller for Cubic
源代码§fn on_ack(
&mut self,
now: Instant,
sent: Instant,
bytes: u64,
app_limited: bool,
rtt: &RttEstimator,
)
fn on_ack( &mut self, now: Instant, sent: Instant, bytes: u64, app_limited: bool, rtt: &RttEstimator, )
Packet deliveries were confirmed 更多信息
源代码§fn on_congestion_event(
&mut self,
now: Instant,
sent: Instant,
is_persistent_congestion: bool,
_lost_bytes: u64,
)
fn on_congestion_event( &mut self, now: Instant, sent: Instant, is_persistent_congestion: bool, _lost_bytes: u64, )
Packets were deemed lost or marked congested 更多信息
源代码§fn on_mtu_update(&mut self, new_mtu: u16)
fn on_mtu_update(&mut self, new_mtu: u16)
当前网络路径的已知 MTU 已更新
源代码§fn metrics(&self) -> ControllerMetrics
fn metrics(&self) -> ControllerMetrics
检索实现特有的指标,用于在启用
qlog 时填充追踪记录源代码§fn clone_box(&self) -> Box<dyn Controller>
fn clone_box(&self) -> Box<dyn Controller>
复制此控制器的状态
源代码§fn initial_window(&self) -> u64
fn initial_window(&self) -> u64
初始拥塞窗口
自动 trait 实现§
impl Freeze for Cubic
impl RefUnwindSafe for Cubic
impl Send for Cubic
impl Sync for Cubic
impl Unpin for Cubic
impl UnsafeUnpin for Cubic
impl UnwindSafe for Cubic
blanket 实现§
源代码§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
源代码§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. 更多信息