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

Method EndStream

src/brpc/details/hpack.cpp:377–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 }
376
377 void EndStream() {
378 if (_remain_bit == 8u) {
379 return;
380 }
381 DCHECK_LT(_remain_bit, 8u);
382 // Add padding `1's to lsb to make _out aligned
383 _partial_byte |= (1 << _remain_bit) - 1;
384 // TODO: push_back is probably costly since it acquires tls everytime it
385 // is invoked.
386 _out->push_back(_partial_byte);
387 _partial_byte = 0;
388 _remain_bit = 0;
389 _out = NULL;
390 ++_out_bytes;
391 }
392
393 uint32_t out_bytes() const { return _out_bytes; }
394

Callers 2

EncodeStringFunction · 0.45
DecodeStringFunction · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected