pub struct ControlSession { /* private fields */ }Expand description
Owns the long-lived control-stream resources so the edge keeps the tunnel registered. Dropping this triggers the dedicated driver thread to wind down, which closes the control stream — the edge then unregisters the tunnel and stops routing traffic.
Construct via register_connection; hold across the tunnel’s
lifetime; either call ControlSession::shutdown_graceful to
fire an unregisterConnection RPC on the way out, or just drop
for an immediate close.
Implementations§
Source§impl ControlSession
impl ControlSession
Sourcepub async fn shutdown_graceful(self, grace: Duration)
pub async fn shutdown_graceful(self, grace: Duration)
Send unregisterConnection and wait up to grace for the
edge to ack before tearing down the control stream. Best-
effort: timeouts and transport errors are swallowed so that
shutdown can’t fail.
Trait Implementations§
Source§impl Drop for ControlSession
impl Drop for ControlSession
Auto Trait Implementations§
impl Freeze for ControlSession
impl !RefUnwindSafe for ControlSession
impl Send for ControlSession
impl Sync for ControlSession
impl Unpin for ControlSession
impl UnsafeUnpin for ControlSession
impl !UnwindSafe for ControlSession
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