From b56bf4c6db4f4d578e35eb17fda17647afc08c2f Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 8 Nov 2020 21:25:46 +0100 Subject: [PATCH] Expose inner node list Signed-off-by: trivernis --- Cargo.toml | 2 +- src/server/mod.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f5e7dba..b8aa09a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vented" description = "Event driven encrypted tcp communicaton" -version = "0.8.0" +version = "0.8.1" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/server/mod.rs b/src/server/mod.rs index 62bab7f..dc311cb 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -116,6 +116,11 @@ impl VentedServer { self.known_nodes.lock().values().cloned().collect() } + /// Returns the actual reference to the inner node list + pub fn nodes_ref(&self) -> Arc>> { + Arc::clone(&self.known_nodes) + } + /// Emits an event to the specified Node /// The actual writing is done in a separate thread from the thread pool. /// With the returned wait group one can wait for the event to be written.