pub struct SessionManager { /* private fields */ }Expand description
Session manager for handling multiple sessions.
Currently supports single-peer operation, but designed for future multi-peer extension.
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub fn set_session(&self, session: NetSession)
pub fn set_session(&self, session: NetSession)
Set the current session
Sourcepub fn set_session_arc(&self, session: Arc<NetSession>)
pub fn set_session_arc(&self, session: Arc<NetSession>)
Set the current session from an existing Arc
Sourcepub fn get_session(&self) -> Option<Arc<NetSession>>
pub fn get_session(&self) -> Option<Arc<NetSession>>
Get the current session
Sourcepub fn clear_session(&self)
pub fn clear_session(&self)
Clear the current session
Sourcepub fn has_session(&self) -> bool
pub fn has_session(&self) -> bool
Check if there’s an active session
Sourcepub fn check_session(&self) -> bool
pub fn check_session(&self) -> bool
Check session health and clean up if timed out
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SessionManager
impl !RefUnwindSafe for SessionManager
impl !UnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more