Loading...
Searching...
No Matches
restinio::impl::http_parser_ctx_t Struct Reference

Parsing result context for using in parser callbacks. More...

`#include <connection.hpp>`

## Public Member Functions

| http_parser_ctx_t (incoming_http_msg_limits_t limits)
| The main constructor.
void | reset ()
| Prepare context to handle new request.
RESTINIO_NODISCARD chunked_input_info_unique_ptr_t | make_chunked_input_info_if_necessary ()
| Creates an instance of chunked_input_info if there is an info about chunks in the body.

## Public Attributes

bool | m_message_complete { false }
| Flag: is http message parsed completely.
std::size_t | m_total_field_count { 0u }
| Total number of parsed HTTP-fields.
const incoming_http_msg_limits_t | m_limits
| Limits for the incoming message.
http_request_header_t | m_header
| Request data.
std::string | m_body
std::string | m_current_field_name
| Parser context temp values and flags.
std::size_t | m_last_value_total_size { 0u }
bool | m_last_was_value { true }
bool | m_leading_headers_completed { false }
chunked_input_info_block_t | m_chunked_info_block

## Detailed Description

Parsing result context for using in parser callbacks.

All data is used as temps, and is usable only after parsing completes new requests then it is moved out.

Definition at line 48 of file connection.hpp.

## Constructor & Destructor Documentation

## http_parser_ctx_t()

restinio::impl::http_parser_ctx_t::http_parser_ctx_t | ( | incoming_http_msg_limits_t | limits | ) |

inline

The main constructor.

Since
  v.0.6.12

Definition at line 98 of file connection.hpp.

## Member Function Documentation

## make_chunked_input_info_if_necessary()

RESTINIO_NODISCARD chunked_input_info_unique_ptr_t restinio::impl::http_parser_ctx_t::make_chunked_input_info_if_necessary | ( |  | ) |

inline

Creates an instance of chunked_input_info if there is an info about chunks in the body.

Since
  v.0.6.9

Definition at line 124 of file connection.hpp.

## reset()

void restinio::impl::http_parser_ctx_t::reset | ( |  | ) |

inline

Prepare context to handle new request.

Definition at line 105 of file connection.hpp.

## Member Data Documentation

## m_body

std::string restinio::impl::http_parser_ctx_t::m_body

Definition at line 53 of file connection.hpp.

## m_chunked_info_block

chunked_input_info_block_t restinio::impl::http_parser_ctx_t::m_chunked_info_block

Since
  v.0.6.9

Definition at line 70 of file connection.hpp.

## m_current_field_name

std::string restinio::impl::http_parser_ctx_t::m_current_field_name

Parser context temp values and flags.

Definition at line 58 of file connection.hpp.

## m_header

http_request_header_t restinio::impl::http_parser_ctx_t::m_header

Request data.

Definition at line 52 of file connection.hpp.

## m_last_value_total_size

std::size_t restinio::impl::http_parser_ctx_t::m_last_value_total_size { 0u }

Definition at line 59 of file connection.hpp.

## m_last_was_value

bool restinio::impl::http_parser_ctx_t::m_last_was_value { true }

Definition at line 60 of file connection.hpp.

## m_leading_headers_completed

bool restinio::impl::http_parser_ctx_t::m_leading_headers_completed { false }

Since
  v.0.6.9

Definition at line 65 of file connection.hpp.

## m_limits

const incoming_http_msg_limits_t restinio::impl::http_parser_ctx_t::m_limits

Limits for the incoming message.

Since
  v.0.6.12

Definition at line 91 of file connection.hpp.

## m_message_complete

bool restinio::impl::http_parser_ctx_t::m_message_complete { false }

Flag: is http message parsed completely.

Definition at line 74 of file connection.hpp.

## m_total_field_count

std::size_t restinio::impl::http_parser_ctx_t::m_total_field_count { 0u }

Total number of parsed HTTP-fields.

This number includes the number of leading HTTP-fields and the number of trailing HTTP-fields (in the case of chunked encoding).

Since
  v.0.6.12

Definition at line 84 of file connection.hpp.

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

- restinio/impl/connection.hpp