Struct NetworkPath
#[non_exhaustive]pub struct NetworkPath {
pub id: PathId,
pub remote: TransportAddr,
pub selected: bool,
pub rtt: Duration,
pub sent_bytes: u64,
pub received_bytes: u64,
pub sent_packets: u64,
pub lost_packets: u64,
pub cwnd: u64,
pub bandwidth: Option<u64>,
}Expand description
One open network path of a Session, as returned by
Session::network_paths.
The counters run from the path’s start, so rates and loss are the
difference between two readings with the same id. A path
that is closed and reopened gets a new id.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: PathIdThe path’s id within the connection, stable while the path is open.
remote: TransportAddrThe remote address as iroh holds it.
selected: boolWhether application data goes over this path.
rtt: DurationThe round trip time estimate.
sent_bytes: u64The UDP payload bytes sent on the path, including path MTU probes and acknowledgement-only packets.
received_bytes: u64The UDP payload bytes received on the path.
sent_packets: u64The QUIC packets sent on the path, without path MTU probes.
lost_packets: u64The QUIC packets lost on the path, without path MTU probes.
cwnd: u64The congestion window, in bytes.
bandwidth: Option<u64>The congestion controller’s bandwidth estimate in bits per second, if it makes one.
Implementations§
§impl NetworkPath
impl NetworkPath
pub fn kind(&self) -> NetworkPathKind
pub fn kind(&self) -> NetworkPathKind
Returns the kind of address the path goes to.
Trait Implementations§
§impl Clone for NetworkPath
impl Clone for NetworkPath
§fn clone(&self) -> NetworkPath
fn clone(&self) -> NetworkPath
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more