added a schedule system

This commit is contained in:
2025-02-19 16:14:31 +01:00
parent c24b0d5d5b
commit 1873a22e23
3 changed files with 58 additions and 7 deletions
+2
View File
@@ -18,6 +18,7 @@ type Receiver = Arc<Mutex<Option<SplitStream<WebSocketStream<TcpStream>>>>>;
static mut GLOBAL_SENDER: Option<Sender> = None;
static mut GLOBAL_RECEIVER: Option<Receiver> = None;
static mut REPLY_HELLO: bool = false;
pub static mut HAS_CONNECTED: bool = false;
async fn set_sender(sender: Sender) {
@@ -139,6 +140,7 @@ async fn handle_message(msg: tungstenite::protocol::Message, args: Args) {
if !REPLY_HELLO {
send_msg("[Connection test] Hello from Rust!").await;
REPLY_HELLO = true;
HAS_CONNECTED = true;
}
}
}