17#ifdef HAS_PROTO_MESSAGE_DUMP
19 auto *proto_msg =
static_cast<const ProtoMessage *
>(msg);
25 const uint8_t footer_size = conn->
helper_->frame_footer_size();
32 to_add = calculated_size;
39 uint16_t total_calculated_size = calculated_size + conn->
batch_header_size_ + footer_size;
40 if (total_calculated_size > remaining_size)
44 shared_buf.
resize(shared_buf.size() + to_add);
46 encode_fn(msg, buffer PROTO_ENCODE_DEBUG_INIT(&shared_buf));
48 return total_calculated_size;