| 26 | typedef req2_t req_t; |
| 27 | |
| 28 | void write_req(const char *file_path, req_t *req) { |
| 29 | std::ofstream file(file_path, std::ios::out | std::ios::binary | std::ios::trunc); |
| 30 | file.write(reinterpret_cast<char *>(req), sizeof(req_t)); |
| 31 | } |
| 32 | |
| 33 | void read_req(const char *file_path, req_t *req) { |
| 34 | std::ifstream file(file_path, std::ios::in | std::ios::binary); |