OPENWORM GAMAING (can send messages to server)

This commit is contained in:
2025-11-15 02:10:30 -05:00
parent e4746b9171
commit 2e00389033
5 changed files with 120 additions and 32 deletions

View File

@@ -112,11 +112,11 @@ async fn handle_stream(
(send, mut recv): (quinn::SendStream, quinn::RecvStream),
) -> Result<(), String> {
drop(send);
let msg = recv
let bytes = recv
.read_to_end(std::mem::size_of::<ClientMsg>())
.await
.map_err(|e| format!("failed reading request: {}", e))?;
println!("received message");
println!("{:?}", msg);
let msg = String::from_utf8(bytes).unwrap();
println!("received message: {:?}", msg);
Ok(())
}