MCPcopy Create free account
hub / github.com/OpenAtomFoundation/pikiwidb / RsyncWriteResp

Function RsyncWriteResp

src/rsync_server.cc:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using namespace RsyncService;
22
23void 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
33RsyncServer::RsyncServer(const std::set<std::string>& ips, const int port) {
34 work_thread_ = std::make_unique<net::ThreadPool>(2, 100000, "RsyncServerWork");

Callers 2

Calls 3

WriteRespMethod · 0.45
NotifyCloseMethod · 0.45
NotifyWriteMethod · 0.45

Tested by

no test coverage detected