From 39b7d75235b4b3006b61f2056a2c9d0ae31a0df4 Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Mon, 26 Mar 2018 13:46:43 +0200 Subject: [PATCH] Automatic clients name request for client + version update --- Rust/Cargo.toml | 2 +- Rust/src/client.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Rust/Cargo.toml b/Rust/Cargo.toml index f3b3de2..9b090f2 100644 --- a/Rust/Cargo.toml +++ b/Rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chat-reseau" -version = "0.5.5" +version = "0.5.7" authors = ["Lucien Cartier-Tilet "] [dependencies] diff --git a/Rust/src/client.rs b/Rust/src/client.rs index 18d73cf..79d7449 100644 --- a/Rust/src/client.rs +++ b/Rust/src/client.rs @@ -114,7 +114,8 @@ fn get_name() -> String { fn write_to_server(stream: TcpStream) { let mut writer = BufWriter::new(&stream); - + writeln!(writer, "REQ CLIENTS").unwrap(); + writer.flush().unwrap(); loop { let line = &*get_entry(); line.trim();