跳到主要内容

Bbr

搜索

结构体 Bbr 

源代码
pub struct Bbr { /* private fields */ }
展开描述

实验性!使用风险自负。

目标是减少 buffer bloat,并在高带宽时延积(BDP)的网络上提升性能。基于 Google 的 quiche 实现 https://source.chromium.org/chromium/chromium/src/+/master:net/third_party/quiche/src/quic/core/congestion_control/bbr_sender.cc, 对应的 BBR 规范见 https://datatracker.ietf.org/doc/html/draft-cardwell-iccrg-bbr-congestion-control。 更多讨论与链接见 https://groups.google.com/g/bbr-dev

实现§

源代码§

impl Bbr

源代码

pub fn new(config: Arc<BbrConfig>, current_mtu: u16) -> Bbr

使用给定的 config 与当前时间 now 构造一份状态

trait 实现§

源代码§

impl Clone for Bbr

源代码§

fn clone(&self) -> Bbr

返回值的副本。 更多信息
1.0.0 · 源代码§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 更多信息
源代码§

impl Controller for Bbr

源代码§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

刚发送了一个或多个数据包
源代码§

fn on_ack( &mut self, now: Instant, sent: Instant, bytes: u64, app_limited: bool, rtt: &RttEstimator, )

Packet deliveries were confirmed 更多信息
源代码§

fn on_end_acks( &mut self, now: Instant, in_flight: u64, app_limited: bool, largest_packet_num_acked: Option<u64>, )

数据包以批量形式被确认,所有包使用相同的 now 参数。这表示其中某一批已完成。
源代码§

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)

当前网络路径的已知 MTU 已更新
源代码§

fn window(&self) -> u64

处于飞行中的可触发 ACK 的字节数
源代码§

fn metrics(&self) -> ControllerMetrics

检索实现特有的指标,用于在启用 qlog 时填充追踪记录
源代码§

fn clone_box(&self) -> Box<dyn Controller>

复制此控制器的状态
源代码§

fn initial_window(&self) -> u64

初始拥塞窗口
源代码§

fn into_any(self: Box<Bbr>) -> Box<dyn Any>

返回 Self,用于向下转型以提取实现细节
源代码§

impl Debug for Bbr

源代码§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

使用给定的格式化器格式化此值。 更多信息

自动 trait 实现§

§

impl Freeze for Bbr

§

impl RefUnwindSafe for Bbr

§

impl Send for Bbr

§

impl Sync for Bbr

§

impl Unpin for Bbr

§

impl UnsafeUnpin for Bbr

§

impl UnwindSafe for Bbr

blanket 实现§

源代码§

impl<T> Any for T
where T: 'static + ?Sized,

源代码§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
源代码§

impl<T> Borrow<T> for T
where T: ?Sized,

源代码§

fn borrow(&self) -> &T

Immutably borrows from an owned value. 更多信息
源代码§

impl<T> BorrowMut<T> for T
where T: ?Sized,

源代码§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. 更多信息
源代码§

impl<T> CloneToUninit for T
where T: Clone,

源代码§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 更多信息
源代码§

impl<T> From<T> for T

源代码§

fn from(t: T) -> T

原样返回该参数。

源代码§

impl<T> Instrument for T

源代码§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. 更多信息
源代码§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. 更多信息
源代码§

impl<T, U> Into<U> for T
where U: From<T>,

源代码§

fn into(self) -> U

调用 U::from(self)

也就是说,此转换行为完全由 From<T> for U 的实现决定。

源代码§

impl<T> ToOwned for T
where T: Clone,

源代码§

type Owned = T

获得所有权后的类型。
源代码§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. 更多信息
源代码§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 更多信息
源代码§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

源代码§

type Error = Infallible

转换出错时返回的类型。
源代码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
源代码§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

源代码§

type Error = <U as TryFrom<T>>::Error

转换出错时返回的类型。
源代码§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。
源代码§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

源代码§

fn vzip(self) -> V

源代码§

impl<T> WithSubscriber for T

源代码§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. 更多信息
源代码§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. 更多信息
源代码§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

源代码§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

源代码§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,