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

Method flush

src/brpc/stream.cpp:555–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553 {}
554 ~MessageBatcher() { flush(); }
555 void flush() {
556 if (_size > 0 && _s->_options.handler != NULL) {
557 _s->_options.handler->on_received_messages(
558 _s->id(), _storage, _size);
559 }
560 for (size_t i = 0; i < _size; ++i) {
561 delete _storage[i];
562 }
563 _size = 0;
564 }
565 void push(butil::IOBuf* buf) {
566 if (_size == _cap) {
567 flush();

Callers 3

ConsumeMethod · 0.80
DoRunMethod · 0.80
SerializeThriftRequestFunction · 0.80

Calls 2

on_received_messagesMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected