aboutsummaryrefslogtreecommitdiff
path: root/server/protocol/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-30 19:35:00 +0100
committermetamuffin <metamuffin@disroot.org>2025-10-30 19:35:02 +0100
commit2558e05b3661d3812ca6d417e5604da615124644 (patch)
tree30e09a9b63f6a66d1081c84f513541fc5446d539 /server/protocol/src/lib.rs
parentd861319090fa6378aabf4fd102566083b915c1a5 (diff)
downloadhurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar
hurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar.bz2
hurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar.zst
Add connection keepalives; Disconnect reasions
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r--server/protocol/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index 15911dd3..6b4e97f1 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -43,6 +43,8 @@ fn test_version_parse() {
let _ = *VERSION;
}
+pub const KEEPALIVE_INTERVAL: f32 = 1.;
+
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[serde(transparent)]
pub struct PlayerID(#[serde(deserialize_with = "deser_i64")] pub i64);
@@ -142,6 +144,7 @@ pub enum PacketS {
Idle {
paused: bool,
},
+ Keepalive,
Ready,
/// For use in replay sessions only