summaryrefslogtreecommitdiff
path: root/server/src/session
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/session')
-rw-r--r--server/src/session/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/session/mod.rs b/server/src/session/mod.rs
new file mode 100644
index 0000000..b6ea014
--- /dev/null
+++ b/server/src/session/mod.rs
@@ -0,0 +1,17 @@
+// Copyright 2022-2024 Gabriel Bjørnager Jensen.
+
+use bowshock::net::SessionToken;
+use bzipper::FixedString;
+use std::net::SocketAddr;
+
+pub struct Session {
+ pub token: SessionToken,
+ pub username: FixedString<0x10>,
+
+ pub addr: SocketAddr,
+}
+
+impl PartialEq<SessionToken> for Session {
+ #[inline(always)]
+ fn eq(&self, other: &SessionToken) -> bool { self.token == *other }
+}