From dba41282cac86a740c007498709e996b9fa3e59b Mon Sep 17 00:00:00 2001 From: Aria Date: Thu, 19 Oct 2023 21:00:26 +0100 Subject: wip: broadcast message batching --- common/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/src/lib.rs') diff --git a/common/src/lib.rs b/common/src/lib.rs index 69a872b..bfdfa42 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -21,7 +21,7 @@ pub mod msg_id; pub trait Handler: Send + Sync + 'static { type Body: Serialize + for<'a> Deserialize<'a> + Send + Clone; - fn init(node_id: String, node_ids: Vec, output: Output) -> Self; + fn init(node_id: String, node_ids: Vec, output: Output) -> Arc; fn handle<'a>( self: &'a Arc, header: MessageHeader, @@ -63,7 +63,7 @@ pub fn run_server() { fn sync_init_handler( reader: R, mut writer: W, -) -> (H, Receiver>) { +) -> (Arc, Receiver>) { // Receive the init message let deser = Deserializer::from_reader(reader); let mut deser = deser.into_iter::>(); -- cgit v1.2.3