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

Method H2UnsentResponse

src/brpc/policy/http2_rpc_protocol.cpp:1640–1650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1638}
1639
1640H2UnsentResponse::H2UnsentResponse(Controller* c, int stream_id, bool is_grpc)
1641 : _size(0)
1642 , _stream_id(stream_id)
1643 , _http_response(c->release_http_response())
1644 , _is_grpc(is_grpc) {
1645 _data.swap(c->response_attachment());
1646 if (is_grpc) {
1647 _grpc_status = ErrorCodeToGrpcStatus(c->ErrorCode());
1648 PercentEncode(c->ErrorText(), &_grpc_message);
1649 }
1650}
1651
1652H2UnsentResponse* H2UnsentResponse::New(Controller* c, int stream_id, bool is_grpc) {
1653 const HttpHeader* const h = &c->http_response();

Callers

nothing calls this directly

Calls 6

ErrorCodeToGrpcStatusFunction · 0.85
PercentEncodeFunction · 0.85
release_http_responseMethod · 0.80
ErrorCodeMethod · 0.80
ErrorTextMethod · 0.80
swapMethod · 0.45

Tested by

no test coverage detected