upd: ready to fix read in half way of write

This commit is contained in:
2023-12-12 07:29:45 +00:00
parent a7fcafca83
commit ffb1a5f788
4 changed files with 41 additions and 4 deletions

View File

@ -28,8 +28,15 @@ void BookStoreMain(bool is_server, std::string config_dir) {
}
input << "#Request " << SessionToken << " I-T-D " << AuthenticationKey
<< ' ' << cmd << '\n';
output.getline(tmp);
std::cout << tmp << std::endl;
std::string SessionToken;
std::string OperationToken;
int LineCounter;
continue;
output >> SessionToken >> OperationToken >> LineCounter;
for (int i = 0; i < LineCounter; i++) {
output.getline(tmp);
std::cout << tmp << std::endl;
}
}
input << "#CloseSession " << SessionToken << ' ' << AuthenticationKey
<< '\n';