| 21 | using namespace RsyncService; |
| 22 | |
| 23 | void RsyncWriteResp(RsyncService::RsyncResponse& response, std::shared_ptr<net::PbConn> conn) { |
| 24 | std::string reply_str; |
| 25 | if (!response.SerializeToString(&reply_str) || (conn->WriteResp(reply_str) != 0)) { |
| 26 | LOG(WARNING) << "Process FileRsync request serialization failed"; |
| 27 | conn->NotifyClose(); |
| 28 | return; |
| 29 | } |
| 30 | conn->NotifyWrite(); |
| 31 | } |
| 32 | |
| 33 | RsyncServer::RsyncServer(const std::set<std::string>& ips, const int port) { |
| 34 | work_thread_ = std::make_unique<net::ThreadPool>(2, 100000, "RsyncServerWork"); |
no test coverage detected