From c38b3b5d1cfc3ad1ccb560fb85c60303cd83627f Mon Sep 17 00:00:00 2001 From: some body Date: Thu, 16 Sep 2021 17:13:13 -0500 Subject: [PATCH] RircdState::run() added Shutdown pocl --- src/state.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/state.rs b/src/state.rs index 136c865..f5dcd5b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -68,6 +68,35 @@ impl RircdState { //> who needs a daemon that does nothing and where nothing can be configured to be done + ////////////////////////////////////////////// + // + // T O D O + // + // Add a mechanism to on received + // Event::Message's to only send + // them to ALL other endpoints + // except to that where it originated + // from TO PREVENT ECHOING + // + // Eg over a .send_from field + // eg: + // + // match event.kind { + // Message(msg) => { + // for ep_rc in endpoints_receivers { + // if ep_rc != msg.from { + // ep_rc.send(msg) + // } + // } + // }, + // } + // + // ^^^ FOR THIS maybe having a wrapper around (R) from + // the endpoint_receivers[R] is required. That contains + // a ref to the endpoint or sth ... idk + // + ////////////////////////////////////////////// + loop { println!("received event"); tokio::select! {