summaryrefslogtreecommitdiffstats
path: root/src/transport
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-27 00:36:40 +0100
committertv <tv@krebsco.de>2026-10-27 00:36:40 +0100
commitfde8a76ec5d8e697d9b13470cd15ed324bae3d00 (patch)
tree6045b4c9fcd5ca2da221668f23e115c88c8e3d97 /src/transport
parent7af8f58d46737bb5835aa1625485f22ecf374ebe (diff)
talk about "transport" unless mycelium is meant
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/mod.rs8
-rw-r--r--src/transport/traffic.rs10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index d97c51c..61b1f4b 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -21,10 +21,10 @@ pub(crate) mod wire;
/// Random identifier of one run of a node (from start to exit).
pub(crate) type RunId = [u8; 16];
-/// Most heads listed in a keepalive; more are sent as a digest. A head takes 34 bytes on
-/// the wire, so 32 of them keep a keepalive within one Mycelium chunk (1300 bytes; see
-/// the size test in `mycelium`). There are rarely more heads than nodes that wrote
-/// concurrently since the last merging write.
+/// Most heads listed in a keepalive; more are sent as a digest. A head takes 34 bytes
+/// on the wire, so 32 of them keep a keepalive within one small packet (a Mycelium
+/// chunk: 1300 bytes; see the size test in `mycelium`). There are rarely more heads
+/// than nodes that wrote concurrently since the last merging write.
pub(crate) const MAX_LISTED_HEADS: usize = 32;
/// A document's heads, compactly: the heads themselves while there are few, otherwise a
diff --git a/src/transport/traffic.rs b/src/transport/traffic.rs
index 0d93525..f9b8289 100644
--- a/src/transport/traffic.rs
+++ b/src/transport/traffic.rs
@@ -1,9 +1,9 @@
//! Messages and bytes exchanged with each peer, by kind: counted where every message
//! passes anyway, at the transport. No messages of our own.
//!
-//! Bytes are payload bytes, what the Mycelium message carries, without its framing,
-//! the topic, or the base64 of its HTTP API. Counters only grow (from the start of the
-//! process); rates are for whoever reads them.
+//! Bytes are payload bytes, what a message carries, without the transport's framing
+//! (for Mycelium: the topic, or the base64 of its HTTP API). Counters only grow (from
+//! the start of the process); rates are for whoever reads them.
//!
//! A message dropped by the debug firewall still counts as sent (the firewall plays a
//! lossy network) but not as received.
@@ -58,10 +58,10 @@ impl ByKind {
#[derive(Debug, Default, Clone, Copy, Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct PeerTraffic {
- /// Handed to Mycelium (it accepted them).
+ /// Handed to the transport (it accepted them).
pub(crate) sent: ByKind,
pub(crate) received: ByKind,
- /// Sends Mycelium refused (e.g. no route to the peer); not counted as sent.
+ /// Sends the transport refused (e.g. no route to the peer); not counted as sent.
pub(crate) refused: ByKind,
}