RESTinio
Public Member Functions | Private Attributes | Friends | List of all members
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 ()
 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_tutest_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 35 of file response_coordinator.hpp.

Member Function Documentation

◆ dequeue_group()

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

Extract write group from data queue.

Definition at line 82 of file response_coordinator.hpp.

◆ empty()

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

Is context empty.

Definition at line 78 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 60 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 112 of file response_coordinator.hpp.

◆ reinit()

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

Reinitialize context.

Parameters
request_idNew request id.

Definition at line 47 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 94 of file response_coordinator.hpp.

◆ response_output_flags() [1/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 98 of file response_coordinator.hpp.

◆ response_output_flags() [2/2]

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

Get flags of corrent response data flow.

Definition at line 105 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 40 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 120 of file response_coordinator.hpp.

◆ m_response_output_flags

response_output_flags_t restinio::impl::response_context_t::m_response_output_flags
private

◆ m_write_groups

write_groups_container_t restinio::impl::response_context_t::m_write_groups
private

Unsent responses parts.

Definition at line 123 of file response_coordinator.hpp.


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