aboutsummaryrefslogtreecommitdiff
path: root/server/protocol/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/protocol/src')
-rw-r--r--server/protocol/src/lib.rs1
-rw-r--r--server/protocol/src/registry.rs20
2 files changed, 21 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index bf7fc3d1..56ddc7a8 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -26,6 +26,7 @@ use std::{collections::HashSet, fmt::Display};
pub use glam;
pub mod movement;
+pub mod registry;
pub const VERSION: (u32, u32) = (7, 0);
diff --git a/server/protocol/src/registry.rs b/server/protocol/src/registry.rs
new file mode 100644
index 00000000..f1e9a083
--- /dev/null
+++ b/server/protocol/src/registry.rs
@@ -0,0 +1,20 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Serialize)]
+pub struct Entry {
+ pub name: String,
+ pub address: Vec<String>,
+ pub players_online: usize,
+ pub last_game: i64,
+ pub version: (usize, usize),
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct Submission {
+ pub secret: u128,
+ pub name: String,
+ pub players: usize,
+ pub last_game: i64,
+ pub version: (usize, usize),
+ pub uri: String,
+}