Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
symbian::http::Http2 Class Reference

Bounded, I/O-free single-exchange nghttp2 connection. More...

#include <cpp/symbian/http/http2.h>

Classes

struct  State
 

Public Member Functions

 Http2 (const Http2 &)=delete
 
Http2 & operator= (const Http2 &)=delete
 
 ~Http2 ()
 
 Http2 (Http2 &&other) noexcept
 
Http2 & operator= (Http2 &&other) noexcept
 
absl::Status Feed (std::string_view bytes)
 
absl::StatusOr< std::string > TakeOutput ()
 
absl::Status SendRequest (RequestHead head)
 
absl::Status SendHeaders (ResponseHead head)
 
absl::Status Write (std::string_view bytes)
 
absl::Status Finish ()
 
absl::StatusOr< std::optional< std::string > > Read ()
 
bool headers_received () const
 
bool ended () const
 
bool peer_settings_received () const
 
bool peer_connect_enabled () const
 
const RequestHead & request () const
 
const ResponseHead & response () const
 
const Headers & trailers () const
 
std::size_t buffered_amount () const
 
void Abort ()
 

Static Public Member Functions

static absl::StatusOr< Http2 > Create (Role role, Limits limits={})
 
static absl::StatusOr< std::unique_ptr< Http2 > > CreateUnique (Role role, Limits limits={})
 

Detailed Description

Bounded, I/O-free single-exchange nghttp2 connection.

Shared HTTP DATA primitive for ordinary HTTP and RFC 8441 WebSockets. Feed arbitrary transport chunks; drain TakeOutput before reading transport. Read returns an empty optional while no DATA is available; ended() separately identifies clean END_STREAM. Reading releases flow-control credit. Write and Finish operate independently of the read half for duplex CONNECT. Header and DATA errors are terminal. No sockets, callbacks into Python, or scheduler are owned here. Only one request is supported per connection. A moved-from owner is ended and empty; status-returning operations fail with FailedPrecondition, queries return empty values, and Abort is harmless.

Constructor & Destructor Documentation

◆ Http2() [1/2]

symbian::http::Http2::Http2 ( const Http2 &  )
delete

◆ ~Http2()

symbian::http::Http2::~Http2 ( )
default

◆ Http2() [2/2]

symbian::http::Http2::Http2 ( Http2 &&  other)
defaultnoexcept

Member Function Documentation

◆ Abort()

void symbian::http::Http2::Abort ( )

◆ buffered_amount()

std::size_t symbian::http::Http2::buffered_amount ( ) const

◆ Create()

absl::StatusOr< Http2 > symbian::http::Http2::Create ( Role  role,
Limits  limits = {} 
)
static

◆ CreateUnique()

absl::StatusOr< std::unique_ptr< Http2 > > symbian::http::Http2::CreateUnique ( Role  role,
Limits  limits = {} 
)
static

◆ ended()

bool symbian::http::Http2::ended ( ) const

◆ Feed()

absl::Status symbian::http::Http2::Feed ( std::string_view  bytes)

◆ Finish()

absl::Status symbian::http::Http2::Finish ( )

◆ headers_received()

bool symbian::http::Http2::headers_received ( ) const

◆ operator=() [1/2]

Http2 & symbian::http::Http2::operator= ( const Http2 &  )
delete

◆ operator=() [2/2]

Http2 & symbian::http::Http2::operator= ( Http2 &&  other)
defaultnoexcept

◆ peer_connect_enabled()

bool symbian::http::Http2::peer_connect_enabled ( ) const

◆ peer_settings_received()

bool symbian::http::Http2::peer_settings_received ( ) const

◆ Read()

absl::StatusOr< std::optional< std::string > > symbian::http::Http2::Read ( )

◆ request()

const RequestHead & symbian::http::Http2::request ( ) const

◆ response()

const ResponseHead & symbian::http::Http2::response ( ) const

◆ SendHeaders()

absl::Status symbian::http::Http2::SendHeaders ( ResponseHead  head)

◆ SendRequest()

absl::Status symbian::http::Http2::SendRequest ( RequestHead  head)

◆ TakeOutput()

absl::StatusOr< std::string > symbian::http::Http2::TakeOutput ( )

◆ trailers()

const Headers & symbian::http::Http2::trailers ( ) const

◆ Write()

absl::Status symbian::http::Http2::Write ( std::string_view  bytes)

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