Server-side handle for writing an HTTP/2 response to one request.
More...
#include <cpp/a11/net/http2.h>
Server-side handle for writing an HTTP/2 response to one request.
Handed to an Http2RequestHandler. Either stream the response incrementally (SendHeaders() then Write()/Finish()) or emit it in one call with SendResponse().
◆ Abort()
| absl::Status a11::net::Http2ResponseWriter::Abort |
( |
absl::Status |
status | ) |
|
Aborts the response with the given status.
◆ Done()
| a11::Task a11::net::Http2ResponseWriter::Done |
( |
| ) |
const |
- Returns
- An awaitable that resolves when the response is done.
◆ Finish()
| absl::Status a11::net::Http2ResponseWriter::Finish |
( |
| ) |
|
Signals the end of the response body.
◆ finished()
| bool a11::net::Http2ResponseWriter::finished |
( |
| ) |
const |
- Returns
- Whether the response has been finished.
◆ headers_sent()
| bool a11::net::Http2ResponseWriter::headers_sent |
( |
| ) |
const |
- Returns
- Whether the response headers have been sent.
◆ SendHeaders()
| absl::Status a11::net::Http2ResponseWriter::SendHeaders |
( |
int |
status, |
|
|
HttpHeaders |
headers = {} |
|
) |
| |
Sends the response status and headers.
◆ SendResponse()
| absl::Status a11::net::Http2ResponseWriter::SendResponse |
( |
int |
status, |
|
|
HttpHeaders |
headers = {}, |
|
|
std::string |
body = {} |
|
) |
| |
Sends a complete response (status, headers, and body) in one call.
◆ stream_id()
| std::int32_t a11::net::Http2ResponseWriter::stream_id |
( |
| ) |
const |
|
inline |
- Returns
- The HTTP/2 stream identifier.
◆ Write()
| absl::Status a11::net::Http2ResponseWriter::Write |
( |
std::string |
data | ) |
|
Writes a chunk of response body data.
◆ Http2Connection
The documentation for this class was generated from the following files: