MCPcopy Create free account
hub / github.com/apache/brpc / SerializeWithCachedSizes

Method SerializeWithCachedSizes

src/brpc/memcache.cpp:97–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void 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
110size_t MemcacheRequest::ByteSizeLong() const {
111 int total_size = static_cast<int>(_buf.size());

Callers 3

Calls 1

NextMethod · 0.45

Tested by

no test coverage detected