diff --git a/src/session.rs b/src/session.rs index a017c71..66e83c4 100644 --- a/src/session.rs +++ b/src/session.rs @@ -102,6 +102,10 @@ impl Session { .get_or_init(|| UnsafeHandle(unsafe { wintun.WintunGetReadWaitEvent(self.inner.0) }))) } + pub fn get_shutdown_event(&self) -> UnsafeHandle { + self.shutdown_event.get_handle() + } + /// Blocks until a packet is available, returning the next packet in the receive queue once this happens. /// If the session is closed via [`Session::shutdown`] all threads currently blocking inside this function /// will return Err(())