pub struct ConnectionManager { /* private fields */ }Expand description
Manages tunnel connections with per-connection FSM and sequence tracking.
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
Sourcepub fn new(
max_connections: usize,
heartbeat_timeout: Duration,
individual_address_base: IndividualAddress,
) -> Self
pub fn new( max_connections: usize, heartbeat_timeout: Duration, individual_address_base: IndividualAddress, ) -> Self
Create a new connection manager.
Sourcepub fn with_desync_threshold(self, threshold: u8) -> Self
pub fn with_desync_threshold(self, threshold: u8) -> Self
Create with custom fatal desync threshold.
Sourcepub fn allocate_channel(&self) -> Option<u8>
pub fn allocate_channel(&self) -> Option<u8>
Allocate a new channel.
Sourcepub fn create_connection(
&self,
channel_id: u8,
client_addr: SocketAddr,
data_endpoint: SocketAddr,
) -> Arc<TunnelConnection>
pub fn create_connection( &self, channel_id: u8, client_addr: SocketAddr, data_endpoint: SocketAddr, ) -> Arc<TunnelConnection>
Create a new connection with Phase 1 components.
Sourcepub fn all(&self) -> Vec<Arc<TunnelConnection>>
pub fn all(&self) -> Vec<Arc<TunnelConnection>>
Get all connections.
Sourcepub fn cleanup_timed_out(&self) -> Vec<u8> ⓘ
pub fn cleanup_timed_out(&self) -> Vec<u8> ⓘ
Clean up timed out connections.
Auto Trait Implementations§
impl !Freeze for ConnectionManager
impl !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl UnsafeUnpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
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