feat(API): Use mio::Token based polling

Avoid polling every single IO source to collect events,
poll those specific IO sources mio tells us about.
This commit is contained in:
Karolin Varner
2024-08-18 21:19:44 +02:00
parent 53e560191f
commit 77760d71df
13 changed files with 403 additions and 98 deletions

View File

@@ -28,6 +28,8 @@ pub trait WireguardBrokerMio: WireGuardBroker {
registry: &mio::Registry,
token: mio::Token,
) -> Result<(), Self::MioError>;
fn mio_token(&self) -> Option<mio::Token>;
/// Run after a mio::poll operation
fn process_poll(&mut self) -> Result<(), Self::MioError>;