aboutsummaryrefslogtreecommitdiff
path: root/server/src/server.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/src/server.rs
parentd861319090fa6378aabf4fd102566083b915c1a5 (diff)
downloadhurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar
hurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar.bz2
hurrycurry-2558e05b3661d3812ca6d417e5604da615124644.tar.zst
Add connection keepalives; Disconnect reasions
Diffstat (limited to 'server/src/server.rs')
-rw-r--r--server/src/server.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/server.rs b/server/src/server.rs
index 47f556e2..fc2df029 100644
--- a/server/src/server.rs
+++ b/server/src/server.rs
@@ -49,7 +49,7 @@ pub struct ConnectionData {
pub players: HashSet<PlayerID>,
pub idle: bool,
pub ready: bool,
- pub last_player_input: f32,
+ pub keepalive_timer: f32,
pub replies: mpsc::Sender<PacketC>,
}
@@ -60,7 +60,7 @@ pub enum AnnounceState {
}
pub struct ServerConfig {
- pub inactivity_kick_timeout: f32,
+ pub inactivity_timeout: f32,
pub lobby: String,
}
@@ -114,7 +114,7 @@ impl Server {
impl Default for ServerConfig {
fn default() -> Self {
Self {
- inactivity_kick_timeout: 60.,
+ inactivity_timeout: 60.,
lobby: "lobby".to_string(),
}
}
@@ -642,7 +642,7 @@ impl Server {
self.score_changed = true;
}
PacketS::ReplayTick { .. } => return Err(tre!("s.error.packet_not_supported")),
- PacketS::Idle { .. } | PacketS::Ready => (),
+ PacketS::Idle { .. } | PacketS::Ready | PacketS::Keepalive => (),
PacketS::Debug(d) => self.packet_out.push_back(PacketC::Debug(d)),
}
Ok(())