From a8900d5246cbf573a94c6faf411f69dc51c5c529 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 8 Nov 2020 16:19:22 +0100 Subject: [PATCH] Expose node list event Signed-off-by: trivernis --- Cargo.toml | 2 +- src/server/server_events.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4db9ac9..7621c52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vented" description = "Event driven encrypted tcp communicaton" -version = "0.6.0" +version = "0.6.1" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/server/server_events.rs b/src/server/server_events.rs index 91d7f61..ac6c9ec 100644 --- a/src/server/server_events.rs +++ b/src/server/server_events.rs @@ -17,7 +17,7 @@ pub(crate) const REDIRECT_CONFIRM_EVENT: &str = "conn:redirect_confirm"; pub(crate) const REDIRECT_FAIL_EVENT: &str = "conn:redirect_failed"; pub(crate) const REDIRECT_REDIRECTED_EVENT: &str = "conn:redirect_redirected"; pub(crate) const NODE_LIST_REQUEST_EVENT: &str = "conn:node_list_request"; -pub(crate) const NODE_LIST_EVENT: &str = "conn:node_list"; +const NODE_LIST_EVENT: &str = "conn:node_list"; pub const READY_EVENT: &str = "server:ready"; @@ -83,12 +83,12 @@ pub(crate) struct RedirectResponsePayload { } #[derive(Serialize, Deserialize)] -pub(crate) struct NodeListPayload { +pub struct NodeListPayload { pub nodes: Vec, } #[derive(Serialize, Deserialize)] -pub(crate) struct NodeListElement { +pub struct NodeListElement { id: String, public_key: [u8; 32], address: Option,