impl From<MetaData<'_>> for PacketHeader { fn from(val: MetaData<'_>) -> Self { let path = val.path.borrow(); // For long-header packets, scid/dcid reflect who sent the packet: // on TX we are the source; on RX the peer is the source. let (scid, dcid) = match val.direction {
Direction::Tx => (
path.local_cid().map(AsRef::as_ref),
path.remote_cid().map(AsRef::as_ref),
),
Direction::Rx => (
path.remote_cid().map(AsRef::as_ref),
path.local_cid().map(AsRef::as_ref),
),
}; Self::with_type(
val.packet_type.into(),
Some(val.packet_number),
Some(val.version.wire_version()),
scid,
dcid,
)
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.