Client side of an HTTP/2 extended CONNECT stream.
More...
#include <cpp/a11/net/http2.h>
Client side of an HTTP/2 extended CONNECT stream.
Request DATA remains writable via Write()/Finish() while response DATA is read independently with Read() on the same stream. This bidirectional primitive is what the WebSocket transport is built on.
◆ Abort()
| absl::Status a11::net::Http2DuplexStream::Abort |
( |
absl::Status |
status = absl::CancelledError( "HTTP/2 duplex stream cancelled") | ) |
|
Aborts the whole duplex stream with the given status.
◆ Done()
| a11::Task a11::net::Http2DuplexStream::Done |
( |
| ) |
const |
- Returns
- An awaitable that resolves when the duplex stream is done.
◆ Finish()
| absl::Status a11::net::Http2DuplexStream::Finish |
( |
| ) |
|
Closes the request side, signalling END_STREAM to the peer.
◆ Headers()
- Returns
- An awaitable resolving to the response status and headers.
◆ Read()
| a11::Future< std::optional< std::string > > a11::net::Http2DuplexStream::Read |
( |
| ) |
|
- Returns
- An awaitable resolving to the next inbound chunk, or nullopt at end of stream.
◆ stream_id()
| std::int32_t a11::net::Http2DuplexStream::stream_id |
( |
| ) |
const |
- Returns
- The HTTP/2 stream identifier.
◆ Write()
| absl::Status a11::net::Http2DuplexStream::Write |
( |
std::string |
data | ) |
|
Writes a chunk of request DATA.
◆ Http2Client
◆ Http2Connection
The documentation for this class was generated from the following files: