mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-03-01 06:53:10 -08:00
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:
@@ -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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user