From df0680300496d4db730abe2a3ffb0a8167c30595 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 22 Oct 2025 16:35:18 +0800 Subject: [PATCH] added start_with_feedback and start_without_feedback's network_code --- src/network/node.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/network/node.rs b/src/network/node.rs index 22e3cb3..92bf237 100755 --- a/src/network/node.rs +++ b/src/network/node.rs @@ -185,8 +185,9 @@ impl Node { self.nat_type.lock().unwrap().clone() } - pub async fn start_without_feedback(&self, token: String) -> Result<()> { + pub async fn start_without_feedback(&self, token: String, network_code: String) -> Result<()> { *self._token.lock().unwrap() = token; + *self.network_code.lock().unwrap() = network_code; let _ = self .start_stop_sender .send(StartStopInfo { @@ -200,9 +201,11 @@ impl Node { pub async fn start_with_feedback( &self, token: String, + network_code: String, timeout: Duration, ) -> Result { *self._token.lock().unwrap() = token; + *self.network_code.lock().unwrap() = network_code; let (tx, rx) = oneshot::channel(); let id = self.get_next_packet_id(); self.packet_id_match.insert(id, tx);