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

Method SendFeedback

src/brpc/stream.cpp:653–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653void Stream::SendFeedback(int64_t _consumed_bytes) {
654 StreamFrameMeta fm;
655 fm.set_frame_type(FRAME_TYPE_FEEDBACK);
656 fm.set_stream_id(_remote_settings.stream_id());
657 fm.set_source_stream_id(id());
658 fm.mutable_feedback()->set_consumed_size(_consumed_bytes);
659 butil::IOBuf out;
660 policy::PackStreamMessage(&out, fm, NULL);
661 WriteToHostSocket(&out);
662}
663
664int Stream::SetHostSocket(Socket *host_socket) {
665 std::call_once(_set_host_socket_flag, [this, host_socket]() {

Callers 1

ConsumeMethod · 0.80

Calls 3

idFunction · 0.85
PackStreamMessageFunction · 0.85
stream_idMethod · 0.45

Tested by

no test coverage detected