Refactored masking

This commit is contained in:
2026-02-19 00:43:56 +01:00
parent 8d67252800
commit 60e5a54261
3 changed files with 39 additions and 33 deletions
+7 -8
View File
@@ -10,14 +10,13 @@ async fn main() -> session_rs::Result<()> {
let read_session = Arc::clone(&session);
tokio::spawn(async move {
loop {
println!("{:?}", read_session.read().await);
// match read_session.read().await {
// Ok(Frame::Text(text)) => {
// println!("Server says: {}", text);
// }
// Ok(_) => {}
// Err(_) => break,
// }
match read_session.read().await {
Ok(Frame::Text(text)) => {
println!("Server says: {}", text);
}
Ok(_) => {}
Err(_) => break,
}
}
});