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] [package]
name = "chat-reseau" name = "chat-reseau"
version = "0.5.5" version = "0.5.7"
authors = ["Lucien Cartier-Tilet <drakpa@drakpa.fr>"] authors = ["Lucien Cartier-Tilet <drakpa@drakpa.fr>"]
[dependencies] [dependencies]

View File

@ -114,7 +114,8 @@ fn get_name() -> String {
fn write_to_server(stream: TcpStream) { fn write_to_server(stream: TcpStream) {
let mut writer = BufWriter::new(&stream); let mut writer = BufWriter::new(&stream);
writeln!(writer, "REQ CLIENTS").unwrap();
writer.flush().unwrap();
loop { loop {
let line = &*get_entry(); let line = &*get_entry();
line.trim(); line.trim();