Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
kcenon::network::protocols::http2::http2_stream Struct Reference

HTTP/2 stream state and data. More...

#include <http2_client.h>

Collaboration diagram for kcenon::network::protocols::http2::http2_stream:
Collaboration graph

Public Member Functions

 http2_stream ()=default
 
 http2_stream (http2_stream &&)=default
 
http2_streamoperator= (http2_stream &&)=default
 

Public Attributes

uint32_t stream_id = 0
 Stream identifier.
 
stream_state state = stream_state::idle
 Current state.
 
std::vector< http_headerrequest_headers
 Request headers.
 
std::vector< http_headerresponse_headers
 Response headers.
 
std::vector< uint8_t > request_body
 Request body.
 
std::vector< uint8_t > response_body
 Response body.
 
int32_t window_size = 65535
 Flow control window.
 
std::promise< http2_responsepromise
 Response promise.
 
bool headers_complete = false
 Headers fully received.
 
bool body_complete = false
 Body fully received.
 
bool is_streaming = false
 Streaming support.
 
std::function< void(std::vector< uint8_t >)> on_data
 Callback for streaming data.
 
std::function< void(std::vector< http_header >)> on_headers
 Callback for headers.
 
std::function< void(int)> on_complete
 Callback when stream ends (status code)
 

Detailed Description

HTTP/2 stream state and data.

Definition at line 70 of file http2_client.h.

Constructor & Destructor Documentation

◆ http2_stream() [1/2]

kcenon::network::protocols::http2::http2_stream::http2_stream ( )
default

◆ http2_stream() [2/2]

kcenon::network::protocols::http2::http2_stream::http2_stream ( http2_stream && )
default

Member Function Documentation

◆ operator=()

http2_stream & kcenon::network::protocols::http2::http2_stream::operator= ( http2_stream && )
default

Member Data Documentation

◆ body_complete

bool kcenon::network::protocols::http2::http2_stream::body_complete = false

Body fully received.

Definition at line 81 of file http2_client.h.

◆ headers_complete

bool kcenon::network::protocols::http2::http2_stream::headers_complete = false

Headers fully received.

Definition at line 80 of file http2_client.h.

◆ is_streaming

bool kcenon::network::protocols::http2::http2_stream::is_streaming = false

Streaming support.

Whether this is a streaming request

Definition at line 84 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_client::start_stream().

◆ on_complete

std::function<void(int)> kcenon::network::protocols::http2::http2_stream::on_complete

Callback when stream ends (status code)

Definition at line 87 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_client::start_stream().

◆ on_data

std::function<void(std::vector<uint8_t>)> kcenon::network::protocols::http2::http2_stream::on_data

Callback for streaming data.

Definition at line 85 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_client::start_stream().

◆ on_headers

std::function<void(std::vector<http_header>)> kcenon::network::protocols::http2::http2_stream::on_headers

Callback for headers.

Definition at line 86 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_client::start_stream().

◆ promise

std::promise<http2_response> kcenon::network::protocols::http2::http2_stream::promise

Response promise.

Definition at line 79 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_client::send_request().

◆ request_body

std::vector<uint8_t> kcenon::network::protocols::http2::http2_stream::request_body

◆ request_headers

◆ response_body

std::vector<uint8_t> kcenon::network::protocols::http2::http2_stream::response_body

Response body.

Definition at line 77 of file http2_client.h.

◆ response_headers

std::vector<http_header> kcenon::network::protocols::http2::http2_stream::response_headers

Response headers.

Definition at line 75 of file http2_client.h.

◆ state

◆ stream_id

◆ window_size

int32_t kcenon::network::protocols::http2::http2_stream::window_size = 65535

Flow control window.

Definition at line 78 of file http2_client.h.

Referenced by kcenon::network::protocols::http2::http2_server_connection::get_or_create_stream().


The documentation for this struct was generated from the following file: