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

Function AppendAsChunk

src/brpc/progressive_attachment.cpp:96–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96inline void AppendAsChunk(butil::IOBuf* chunk_buf, const butil::IOBuf& data,
97 bool before_http_1_1) {
98 if (!before_http_1_1) {
99 AppendChunkHead(chunk_buf, data.size());
100 chunk_buf->append(data);
101 chunk_buf->append("\r\n", 2);
102 } else {
103 chunk_buf->append(data);
104 }
105}
106
107inline void AppendAsChunk(butil::IOBuf* chunk_buf, const void* data,
108 size_t length, bool before_http_1_1) {

Callers 1

WriteMethod · 0.85

Calls 3

AppendChunkHeadFunction · 0.85
sizeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected