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

Method Print

src/brpc/policy/http2_rpc_protocol.cpp:1616–1638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614}
1615
1616void H2UnsentRequest::Print(std::ostream& os) const {
1617 os << "[ H2 REQUEST @" << butil::my_ip() << " ]\n";
1618 for (size_t i = 0; i < _size; ++i) {
1619 os << "> " << _list[i].name << " = " << _list[i].value << '\n';
1620 }
1621 std::unique_lock<butil::Mutex> mu(_mutex);
1622 if (_cntl == NULL) {
1623 return;
1624 }
1625 if (_cntl->has_http_request()) {
1626 const HttpHeader& h = _cntl->http_request();
1627 for (HttpHeader::HeaderIterator it = h.HeaderBegin();
1628 it != h.HeaderEnd(); ++it) {
1629 os << "> " << it->first << " = " << it->second << '\n';
1630 }
1631 }
1632 const butil::IOBuf* body = &_cntl->request_attachment();
1633 if (!body->empty()) {
1634 os << "> \n";
1635 }
1636 os << butil::ToPrintable(*body, FLAGS_http_verbose_max_body_length);
1637
1638}
1639
1640H2UnsentResponse::H2UnsentResponse(Controller* c, int stream_id, bool is_grpc)
1641 : _size(0)

Callers 1

Calls 6

my_ipFunction · 0.85
ToPrintableClass · 0.85
has_http_requestMethod · 0.80
HeaderBeginMethod · 0.80
HeaderEndMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected