pub struct UdpSessionManager { /* private fields */ }Expand description
Manager for tracking active UDP sessions
Implementations§
Source§impl UdpSessionManager
impl UdpSessionManager
pub fn new(idle_timeout: Duration) -> Self
Sourcepub async fn get_or_create_session(
&self,
src: SocketAddr,
dst: SocketAddr,
) -> Result<(UdpSession, bool)>
pub async fn get_or_create_session( &self, src: SocketAddr, dst: SocketAddr, ) -> Result<(UdpSession, bool)>
Get existing session or create new one Returns (session, is_new)
Sourcepub async fn cleanup_idle_sessions(&self) -> Vec<Uuid>
pub async fn cleanup_idle_sessions(&self) -> Vec<Uuid>
Clean up idle sessions
Auto Trait Implementations§
impl !Freeze for UdpSessionManager
impl !RefUnwindSafe for UdpSessionManager
impl Send for UdpSessionManager
impl Sync for UdpSessionManager
impl Unpin for UdpSessionManager
impl UnsafeUnpin for UdpSessionManager
impl !UnwindSafe for UdpSessionManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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