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

Method flush

lib/cpp/src/thrift/transport/TBufferTransports.cpp:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void TBufferedTransport::flush() {
122 resetConsumedMessageSize();
123 // Write out any data waiting in the write buffer.
124 auto have_bytes = static_cast<uint32_t>(wBase_ - wBuf_.get());
125 if (have_bytes > 0) {
126 // Note that we reset wBase_ prior to the underlying write
127 // to ensure we're in a sane state (i.e. internal buffer cleaned)
128 // if the underlying write throws up an exception
129 wBase_ = wBuf_.get();
130 transport_->write(wBuf_.get(), have_bytes);
131 }
132
133 // Flush the underlying transport.
134 transport_->flush();
135}
136
137uint32_t TFramedTransport::readSlow(uint8_t* buf, uint32_t len) {
138 uint32_t want = len;

Callers 2

encodeServerReplyFunction · 0.95
runScenarioFunction · 0.95

Calls 3

writeMethod · 0.65
getMethod · 0.45
resetMethod · 0.45

Tested by 2

encodeServerReplyFunction · 0.76
runScenarioFunction · 0.76