diff --git a/src/server/client/client_profile.rs b/src/server/client/client_profile.rs index f9646c4..2c4d869 100644 --- a/src/server/client/client_profile.rs +++ b/src/server/client/client_profile.rs @@ -77,11 +77,7 @@ impl<'a> Client<'a> { match command { Commands::Info(Some(params)) => { - self.get_stream().write_all(a.to_string().as_bytes()); - /* why not do this? - * - * self.transmit_data(a.to_string().as_str()); - */ + self.transmit_data(a.to_string().as_str()); }, Commands::Disconnect(None) => { @@ -89,10 +85,17 @@ impl<'a> Client<'a> { Commands::ClientRemove(Some(params)) => {}, Commands::Client(Some(params)) => { self.transmit_data(a.to_string().as_str()); - todo!() - /* - * a success message needs to be read and confirmed - */ + + let command = Commands::from(&buffer); + match command{ + Commands::Success(None) => { + println!("sucess confirmed"); + }, + _ => { + let error = Commands::Error(None); + self.transmit_data(error.to_string().as_str()); + }, + } }, Commands::Success(data) => {}, _ => {},