fix client install comunication
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user