Automatic clients name request for client + version update

This commit is contained in:
Phuntsok Drak-pa 2018-03-26 13:46:43 +02:00
parent ba9d82b086
commit 39b7d75235
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "chat-reseau"
version = "0.5.5"
version = "0.5.7"
authors = ["Lucien Cartier-Tilet <drakpa@drakpa.fr>"]
[dependencies]

View File

@ -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();