Skip to content

Commit

Permalink
path_id in PathStats
Browse files Browse the repository at this point in the history
  • Loading branch information
qdeconinck committed Feb 29, 2024
1 parent 613c41c commit 714833a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions quiche/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ impl Path {

pub fn stats(&self) -> PathStats {
PathStats {
path_id: self.path_id,
local_addr: self.local_addr,
peer_addr: self.peer_addr,
validation_state: self.validation_state,
Expand Down Expand Up @@ -1237,6 +1238,9 @@ impl PathMap {
/// [`stats()`]: struct.Connection.html#method.stats
#[derive(Clone)]
pub struct PathStats {
/// The explicit path ID of the path, if doing multipath.
pub path_id: PathId,

/// The local address of the path.
pub local_addr: SocketAddr,

Expand Down Expand Up @@ -1314,8 +1318,8 @@ impl std::fmt::Debug for PathStats {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"local_addr={:?} peer_addr={:?} ",
self.local_addr, self.peer_addr,
"path_id={:x} local_addr={:?} peer_addr={:?} ",
self.path_id, self.local_addr, self.peer_addr,
)?;
write!(
f,
Expand Down

0 comments on commit 714833a

Please sign in to comment.