Bladeren bron

修改 代理的字符串,优化socket 心跳

875428575@qq.com 2 jaren geleden
bovenliggende
commit
740893f350
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      src/exchange_libs.rs

+ 4 - 4
src/exchange_libs.rs

@@ -815,7 +815,7 @@ impl SocketTool {
     //                     }
     //                     if lable.to_string() == "okx".to_string() {
     //                         if (Utc::now().timestamp() - okx_ping_time) > 2 {
-    //                             socket.write_message(Message::Ping(Vec::from("ping"))).expect("TODO: panic message");
+    //                             socket.write_message(Message::Ping(Vec::from("ping"))).expect(" panic message");
     //                             writeln!(stdout, "主动------:{:?}---ping", lable).unwrap();
     //                             okx_ping_time = Utc::now().timestamp();
     //                             okx_ping_off = true;
@@ -827,7 +827,7 @@ impl SocketTool {
     //                     let mut op_str = "".to_string();
     //                     if lable.to_string() == "binance".to_string() {
     //                         op_str = "pong".to_string();
-    //                         socket.write_message(Message::Pong(Vec::from(op_str.clone()))).expect("TODO: panic message");
+    //                         socket.write_message(Message::Pong(Vec::from(op_str.clone()))).expect("  panic message");
     //                         writeln!(stdout, "ping----------:{:?}---{:?}", lable, op_str).unwrap();
     //                     }
     //                 }
@@ -903,7 +903,7 @@ impl SocketTool {
     //
     //                     if lable.to_string() == "okx".to_string() {
     //                         if (Utc::now().timestamp() - okx_ping_time) > 2 {
-    //                             socket.write_message(Message::Ping(Vec::from("ping"))).expect("TODO: panic message");
+    //                             socket.write_message(Message::Ping(Vec::from("ping"))).expect(" panic message");
     //                             writeln!(stdout, "主动------:{:?}---ping", lable).unwrap();
     //                             okx_ping_time = Utc::now().timestamp();
     //                             okx_ping_off = true;
@@ -915,7 +915,7 @@ impl SocketTool {
     //                     let mut op_str = "".to_string();
     //                     if lable.to_string() == "binance".to_string() {
     //                         op_str = "pong".to_string();
-    //                         socket.write_message(Message::Pong(Vec::from(op_str.clone()))).expect("TODO: panic message");
+    //                         socket.write_message(Message::Pong(Vec::from(op_str.clone()))).expect(" panic message");
     //                         writeln!(stdout, "ping----------:{:?}---{:?}", lable, op_str).unwrap();
     //                     }
     //                 }