提交 fd5885c1 编写于 作者: Y yang li

Fix prefix suffix packer's heartbeat.

上级 e4be5094
......@@ -172,7 +172,7 @@ public:
return msg;
}
virtual msg_type pack_heartbeat() {return msg_type(1, '\n');}
virtual msg_type pack_heartbeat() {return _prefix + _suffix;}
virtual char* raw_data(msg_type& msg) const {return const_cast<char*>(std::next(msg.data(), _prefix.size()));}
virtual const char* raw_data(msg_ctype& msg) const {return std::next(msg.data(), _prefix.size());}
virtual size_t raw_data_len(msg_ctype& msg) const {return msg.size() - _prefix.size() - _suffix.size();}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册