summaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-28 01:47:47 +0100
committertv <tv@krebsco.de>2026-10-28 01:47:47 +0100
commitdb3c4e997f03a660ac37a6bdf86c6215726a71bd (patch)
tree2aafff562a7cd1c178adbf5b5c5f5e416cb86db6 /src/transport/mod.rs
parent34e7ac8d6af652e0d516bce3e204386d54979b7c (diff)
rename PING/PONG to STATUS/STATUS_REPLY
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index 10a8ae5..b0d0723 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -116,9 +116,9 @@ fn digest_of(sorted_heads: &[ChangeHash]) -> [u8; 32] {
hasher.finalize().into()
}
-/// PING and PONG. Addressed to one peer: `syncs_with_you` is about the recipient.
+/// STATUS and STATUS_REPLY. Addressed to one peer: `syncs_with_you` is about the recipient.
#[derive(Debug, Clone, Serialize, Deserialize)]
-pub(crate) struct Keepalive {
+pub(crate) struct Status {
/// Only comparable between nodes on the same epoch.
#[serde(with = "crate::transport::wire::codec::heads")]
pub(crate) heads: HeadsSummary,
@@ -138,8 +138,8 @@ pub(crate) enum ParsedMessage {
Hello(HelloRequest),
HelloReply(HelloReply),
Sync(SyncEnvelope),
- Ping(Keepalive),
- Pong(Keepalive),
+ Status(Status),
+ StatusReply(Status),
Blob(BlobMessage),
/// Asks the recipient who it is, saying who the sender is (`transport::identity`).
Who(IdentityProof),
@@ -263,8 +263,8 @@ pub(crate) enum MessageKind {
Hello,
HelloReply,
Sync,
- Ping,
- Pong,
+ Status,
+ StatusReply,
Blob,
Who,
Me,
@@ -276,8 +276,8 @@ impl ParsedMessage {
ParsedMessage::Hello(_) => MessageKind::Hello,
ParsedMessage::HelloReply(_) => MessageKind::HelloReply,
ParsedMessage::Sync(_) => MessageKind::Sync,
- ParsedMessage::Ping(_) => MessageKind::Ping,
- ParsedMessage::Pong(_) => MessageKind::Pong,
+ ParsedMessage::Status(_) => MessageKind::Status,
+ ParsedMessage::StatusReply(_) => MessageKind::StatusReply,
ParsedMessage::Blob(_) => MessageKind::Blob,
ParsedMessage::Who(_) => MessageKind::Who,
ParsedMessage::Me(_) => MessageKind::Me,
@@ -291,8 +291,8 @@ impl ParsedMessage {
ParsedMessage::Hello(hello) => Some((hello.epoch, hello.epoch_seq)),
ParsedMessage::HelloReply(reply) => Some((reply.epoch, reply.epoch_seq)),
ParsedMessage::Sync(envelope) => Some((envelope.epoch, envelope.epoch_seq)),
- ParsedMessage::Ping(keepalive) | ParsedMessage::Pong(keepalive) => {
- Some((keepalive.epoch, keepalive.epoch_seq))
+ ParsedMessage::Status(status) | ParsedMessage::StatusReply(status) => {
+ Some((status.epoch, status.epoch_seq))
}
ParsedMessage::Blob(blob) => Some((blob.epoch, blob.epoch_seq)),
ParsedMessage::Who(_) | ParsedMessage::Me(_) => None,