Expose inner node list

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/1/head
trivernis 4 years ago
parent 401bd11821
commit b56bf4c6db
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,7 +1,7 @@
[package]
name = "vented"
description = "Event driven encrypted tcp communicaton"
version = "0.8.0"
version = "0.8.1"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"

@ -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<Mutex<HashMap<String, Node>>> {
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.

Loading…
Cancel
Save