bool response_message::encode_payload(czmqpp::message& message) const { bool result = false; if (response_) { std::string data = response_->SerializeAsString(); message.append(czmqpp::data_chunk(data.begin(), data.end())); result = true; } return result; }
void append_str(czmqpp::message& message, const std::string& command) { message.append(data_chunk(command.begin(), command.end())); }
void append_hash(czmqpp::message& message, const hash_digest& hash) { message.append(data_chunk(hash.begin(), hash.end())); }