added start_with_feedback and start_without_feedback's network_code
This commit is contained in:
parent
d9b1329e6a
commit
df06803004
@ -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<RegisterSuperFeedback> {
|
||||
*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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user