restinio::impl::response_context_t Class Reference

A context for a single response. More...

`#include <response_coordinator.hpp>`

## Public Member Functions

void | reinit (request_id_t request_id) noexcept
| Reinitialize context. More...
void | enqueue_group (write_group_t wg)
| Put write group to data queue. More...
bool | empty () const noexcept
| Is context empty. More...
write_group_t | dequeue_group () noexcept
| Extract write group from data queue. More...
auto | request_id () const noexcept
| Get id of associated request. More...
void | response_output_flags (response_output_flags_t flags) noexcept
| Get flags of corrent response data flow. More...
auto | response_output_flags () const noexcept
| Get flags of corrent response data flow. More...
bool | is_complete () const noexcept
| Is response data of a given request is complete. More...

## Private Attributes

request_id_t | m_request_id { 0 }
write_groups_container_t | m_write_groups
| Unsent responses parts. More...
response_output_flags_t | m_response_output_flags
| Response flags. More...

## Friends

write_groups_container_t & | utest_access (response_context_t &ctx)
| Access write-groups container (used in unit tests) More...

## Detailed Description

A context for a single response.

Definition at line 37 of file response_coordinator.hpp.

## Member Function Documentation

## dequeue_group()

write_group_t restinio::impl::response_context_t::dequeue_group | ( |  | ) |

inlinenoexcept

Extract write group from data queue.

Definition at line 84 of file response_coordinator.hpp.

## empty()

bool restinio::impl::response_context_t::empty | ( |  | ) | const

inlinenoexcept

Is context empty.

Definition at line 80 of file response_coordinator.hpp.

## enqueue_group()

void restinio::impl::response_context_t::enqueue_group | ( | write_group_t | wg | ) |

inline

Put write group to data queue.

Definition at line 62 of file response_coordinator.hpp.

## is_complete()

bool restinio::impl::response_context_t::is_complete | ( |  | ) | const

inlinenoexcept

Is response data of a given request is complete.

Definition at line 131 of file response_coordinator.hpp.

## reinit()

void restinio::impl::response_context_t::reinit | ( | request_id_t | request_id | ) |

inlinenoexcept

Reinitialize context.

Parameters

  request_id | New request id.

Definition at line 49 of file response_coordinator.hpp.

## request_id()

auto restinio::impl::response_context_t::request_id | ( |  | ) | const

inlinenoexcept

Get id of associated request.

Definition at line 113 of file response_coordinator.hpp.

## response_output_flags() [1/2]

auto restinio::impl::response_context_t::response_output_flags | ( |  | ) | const

inlinenoexcept

Get flags of corrent response data flow.

Definition at line 124 of file response_coordinator.hpp.

## response_output_flags() [2/2]

void restinio::impl::response_context_t::response_output_flags | ( | response_output_flags_t | flags | ) |

inlinenoexcept

Get flags of corrent response data flow.

Definition at line 117 of file response_coordinator.hpp.

## Friends And Related Function Documentation

## utest_access

write_groups_container_t & utest_access | ( | response_context_t & | ctx | ) |

friend

Access write-groups container (used in unit tests)

Definition at line 42 of file response_coordinator.hpp.

## Member Data Documentation

## m_request_id

request_id_t restinio::impl::response_context_t::m_request_id { 0 }

private

Definition at line 139 of file response_coordinator.hpp.

## m_response_output_flags

response_output_flags_t restinio::impl::response_context_t::m_response_output_flags

private

Initial value:
{
response_parts_attr_t::not_final_parts,
response_connection_attr_t::connection_keepalive }
restinio::response_connection_attr_t::connection_keepalive
@ connection_keepalive
This response says to keep connection.
restinio::response_parts_attr_t::not_final_parts
@ not_final_parts
Intermediate parts (more parts of response to follow).

Response flags.

Definition at line 146 of file response_coordinator.hpp.

## m_write_groups

write_groups_container_t restinio::impl::response_context_t::m_write_groups

private

Unsent responses parts.

Definition at line 142 of file response_coordinator.hpp.

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

- restinio/impl/response_coordinator.hpp