MCPcopy Create free account
hub / github.com/Tencent/phxpaxos / PackMsg

Method PackMsg

src/algorithm/base.cpp:66–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66int Base :: PackMsg(const PaxosMsg & oPaxosMsg, std::string & sBuffer)
67{
68 std::string sBodyBuffer;
69 bool bSucc = oPaxosMsg.SerializeToString(&sBodyBuffer);
70 if (!bSucc)
71 {
72 PLGErr("PaxosMsg.SerializeToString fail, skip this msg");
73 return -1;
74 }
75
76 int iCmd = MsgCmd_PaxosMsg;
77 PackBaseMsg(sBodyBuffer, iCmd, sBuffer);
78
79 return 0;
80}
81
82int Base :: PackCheckpointMsg(const CheckpointMsg & oCheckpointMsg, std::string & sBuffer)
83{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected