added check for success return message
This commit is contained in:
parent
b62d32dcd5
commit
1ebde0f0ed
|
|
@ -77,11 +77,7 @@ impl<'a> Client<'a> {
|
||||||
match command {
|
match command {
|
||||||
|
|
||||||
Commands::Info(Some(params)) => {
|
Commands::Info(Some(params)) => {
|
||||||
self.get_stream().write_all(a.to_string().as_bytes());
|
self.transmit_data(a.to_string().as_str());
|
||||||
/* why not do this?
|
|
||||||
*
|
|
||||||
* self.transmit_data(a.to_string().as_str());
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
Commands::Disconnect(None) => {
|
Commands::Disconnect(None) => {
|
||||||
|
|
||||||
|
|
@ -89,10 +85,17 @@ impl<'a> Client<'a> {
|
||||||
Commands::ClientRemove(Some(params)) => {},
|
Commands::ClientRemove(Some(params)) => {},
|
||||||
Commands::Client(Some(params)) => {
|
Commands::Client(Some(params)) => {
|
||||||
self.transmit_data(a.to_string().as_str());
|
self.transmit_data(a.to_string().as_str());
|
||||||
todo!()
|
|
||||||
/*
|
let command = Commands::from(&buffer);
|
||||||
* a success message needs to be read and confirmed
|
match command{
|
||||||
*/
|
Commands::Success(None) => {
|
||||||
|
println!("sucess confirmed");
|
||||||
|
},
|
||||||
|
_ => {
|
||||||
|
let error = Commands::Error(None);
|
||||||
|
self.transmit_data(error.to_string().as_str());
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Commands::Success(data) => {},
|
Commands::Success(data) => {},
|
||||||
_ => {},
|
_ => {},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue