Added events method
This commit is contained in:
parent
25d0d296c1
commit
33b5801ff5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue