diff --git a/Cargo.toml b/Cargo.toml index d49b256..dff95a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vented" description = "Event driven encrypted tcp communicaton" -version = "0.2.1" +version = "0.3.0" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/server/mod.rs b/src/server/mod.rs index 1d94487..40190de 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -95,6 +95,16 @@ impl VentedServer { } } + /// Returns the nodeId of the server + pub fn node_id(&self) -> String { + self.node_id.clone() + } + + /// Returns the nodes known to the server + pub fn nodes(&self) -> Vec { + self.known_nodes.lock().clone() + } + /// Emits an event to the specified Node /// The actual writing is done in a separate thread from the thread pool. /// With the returned waitgroup one can wait for the event to be written.