A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::net::Http2RequestBodyStream Class Reference

Pull-oriented request DATA for an extended CONNECT stream. More...

#include <cpp/a11/net/http2.h>

Inheritance diagram for a11::net::Http2RequestBodyStream:
[legend]

Classes

struct  State
 

Public Member Functions

a11::Future< std::optional< std::string > > Read ()
 
a11::Task Done () const
 
absl::Status Cancel (absl::Status status=absl::CancelledError("HTTP/2 request body cancelled"))
 Cancels the body stream with the given status.
 
std::int32_t stream_id () const
 

Friends

class Http2Connection
 

Detailed Description

Pull-oriented request DATA for an extended CONNECT stream.

Present on HttpRequest::body_stream only when a request remains open after its headers. Read incrementally with Read() until it yields nullopt.

Member Function Documentation

◆ Cancel()

absl::Status a11::net::Http2RequestBodyStream::Cancel ( absl::Status  status = absl::CancelledError(                          "HTTP/2 request body cancelled"))

Cancels the body stream with the given status.

◆ Done()

a11::Task a11::net::Http2RequestBodyStream::Done ( ) const
Returns
An awaitable that resolves when the body stream is done.

◆ Read()

a11::Future< std::optional< std::string > > a11::net::Http2RequestBodyStream::Read ( )
Returns
An awaitable resolving to the next body chunk, or nullopt at end of stream.

◆ stream_id()

std::int32_t a11::net::Http2RequestBodyStream::stream_id ( ) const
Returns
The HTTP/2 stream identifier.

Friends And Related Symbol Documentation

◆ Http2Connection


The documentation for this class was generated from the following files: