Added events method

This commit is contained in:
Daniel Sanchez Quiros 2024-02-16 08:45:13 +01:00
parent 25d0d296c1
commit 33b5801ff5
1 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,10 @@ impl<Event> WakuNodeHandle<Event> {
let mut ctx = self.ctx.lock().unwrap();
events::waku_set_event_callback(ctx.obj_ptr, f)
}
pub fn events(&self) -> broadcast::Receiver<Event> {
self.events_channel.resubscribe()
}
}
/// Spawn a new Waku node with the given configuration (default configuration if `None` provided)