aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/traffic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/traffic.rs')
-rw-r--r--src/transport/traffic.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/traffic.rs b/src/transport/traffic.rs
index 5ff588e..89217c3 100644
--- a/src/transport/traffic.rs
+++ b/src/transport/traffic.rs
@@ -40,6 +40,7 @@ impl Counter {
#[derive(Debug, Default, Clone, Copy, Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct ByKind {
+ /// HELLO and SPEAKS, which goes with each handshake.
pub(crate) hello: Counter,
pub(crate) hello_reply: Counter,
pub(crate) sync: Counter,
@@ -84,7 +85,7 @@ impl ByKind {
fn get(&self, kind: MessageKind) -> &Counter {
match kind {
- MessageKind::Hello => &self.hello,
+ MessageKind::Hello | MessageKind::Speaks => &self.hello,
MessageKind::HelloReply => &self.hello_reply,
MessageKind::Sync => &self.sync,
MessageKind::Status => &self.status,
@@ -103,7 +104,7 @@ impl ByKind {
fn get_mut(&mut self, kind: MessageKind) -> &mut Counter {
match kind {
- MessageKind::Hello => &mut self.hello,
+ MessageKind::Hello | MessageKind::Speaks => &mut self.hello,
MessageKind::HelloReply => &mut self.hello_reply,
MessageKind::Sync => &mut self.sync,
MessageKind::Status => &mut self.status,
@@ -366,6 +367,7 @@ fn names(kind: MessageKind) -> (&'static str, &'static str) {
MessageKind::NeighbourReply => ("NEIGHBOUR_REPLY", "hyparview"),
MessageKind::Disconnect => ("DISCONNECT", "hyparview"),
MessageKind::Refusals => ("REFUSALS", "refusals"),
+ MessageKind::Speaks => ("SPEAKS", "hello"),
}
}