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

Method CheckProgressiveRead

src/brpc/policy/http_rpc_protocol.cpp:1782–1794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782void HttpContext::CheckProgressiveRead(const void* arg, Socket *socket) {
1783 if (arg == NULL || !((Server *)arg)->has_progressive_read_method()) {
1784 // arg == NULL indicates not in server-end
1785 return;
1786 }
1787 const Server::MethodProperty *const sp = FindMethodPropertyByURI(
1788 header().uri().path(), (Server *)arg,
1789 const_cast<std::string *>(&header().unresolved_path()));
1790 if (sp != NULL && sp->params.enable_progressive_read) {
1791 set_read_body_progressively(true);
1792 socket->read_will_be_progressive(CONNECTION_TYPE_SHORT);
1793 }
1794}
1795
1796} // namespace policy
1797} // namespace brpc

Callers 1

ParseHttpMessageFunction · 0.80

Calls 2

FindMethodPropertyByURIFunction · 0.85

Tested by

no test coverage detected