From 55f241863af1a394ef49acd2d36460dd1ba3764f Mon Sep 17 00:00:00 2001 From: Jacobtread Date: Sun, 13 Oct 2024 17:12:34 +1300 Subject: [PATCH] docs: documented session fields --- src/session/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/session/mod.rs b/src/session/mod.rs index ebe80a3..18f13f7 100644 --- a/src/session/mod.rs +++ b/src/session/mod.rs @@ -56,16 +56,27 @@ pub type SessionLink = Arc; pub type WeakSessionLink = Weak; pub struct Session { + /// Unique ID for this session id: u32, + + /// IP address associated with the session pub addr: Ipv4Addr, /// User will not have an association if they are using an outdated /// client version. pub association: Option, + /// Lock for handling packets with a session, ensures only one packet is + /// processed at a time and in the same order that it was received busy_lock: QueueLock, + + /// Sender for sending packets to the session tx: mpsc::UnboundedSender, + + /// Mutable data associated with the session data: Mutex>, + + /// Access to the sessions store for removing the session -> player association sessions: Arc, }