fix client install comunication

This commit is contained in:
2020-05-16 20:52:10 +02:00
parent 7691c80fb4
commit 9eb45f329a
14 changed files with 82 additions and 66 deletions

View File

@@ -11,6 +11,7 @@ bool session_manager::loggin(std::string username, std::string passwd){
}
int session_manager::install_command(std::string package){
this->con->write_string("exec");
read_uses uses(package);
this->con->write_string(package);
if(uses.exist_file()){
@@ -23,3 +24,11 @@ int session_manager::install_command(std::string package){
this->con->read_string(buffer,2);
return atoi(buffer.data());
}
int session_manager::remove_command(std::string package){
this->con->write_string("remv");
this->con->write_string(package);
std::string buffer;
this->con->read_string(buffer,2);
return atoi(buffer.data());
}