| 95 | } |
| 96 | |
| 97 | void MemcacheRequest::SerializeWithCachedSizes( |
| 98 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 99 | LOG(WARNING) << "You're not supposed to serialize a MemcacheRequest"; |
| 100 | |
| 101 | // simple approach just making it work. |
| 102 | butil::IOBufAsZeroCopyInputStream wrapper(_buf); |
| 103 | const void* data = NULL; |
| 104 | int size = 0; |
| 105 | while (wrapper.Next(&data, &size)) { |
| 106 | output->WriteRaw(data, size); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | size_t MemcacheRequest::ByteSizeLong() const { |
| 111 | int total_size = static_cast<int>(_buf.size()); |
no test coverage detected