RESTinio
|
Namespaces | |
namespace | acceptor_details |
namespace | connection_settings_details |
namespace | overflow_controlled_integer_accumulator_details |
namespace | string_caseless_compare_details |
Classes | |
class | acceptor_t |
Context for accepting http connections. More... | |
class | buf_iface_t |
Internal interface for a trivial buffer-like entity. More... | |
struct | check_negative_extremum |
struct | check_positive_extremum |
struct | chunked_input_info_block_t |
Bunch of data related to chunked input. More... | |
class | connection_base_t |
HTTP connection base. More... | |
class | connection_factory_t |
Factory for connections. More... | |
struct | connection_input_t |
Data associated with connection read routine. More... | |
struct | connection_settings_t |
Parameters shared between connections. More... | |
class | connection_t |
Context for handling http connections. More... | |
class | const_buf_t |
Buffer entity for const buffer. More... | |
class | datasizeable_buf_t |
User defined datasizable object. More... | |
class | empty_buf_t |
Empty buffer entity. More... | |
class | executor_wrapper_t |
Wrapper for an executor (strand) used by connections. More... | |
class | external_io_context_for_thread_pool_t |
A class for holding a reference to external Asio's io_context. More... | |
class | fixed_buffer_t |
Helper class for reading bytes and feeding them to parser. More... | |
class | generic_request_extra_data_holder_t |
Helper class for holding a buffer for extra-data object to be incorporated into a request object. More... | |
struct | http_parser_ctx_t |
Parsing result context for using in parser callbacks. More... | |
class | ioctx_on_thread_pool_t |
class | overflow_controlled_integer_accumulator_t |
Helper class for accumulating integer value during parsing it from string (with check for overflow). More... | |
class | own_io_context_for_thread_pool_t |
A class for holding actual instance of Asio's io_context. More... | |
class | response_context_t |
A context for a single response. More... | |
class | response_context_table_t |
Helper storage for responses' contexts. More... | |
class | response_coordinator_t |
Coordinator for process of sending responses with respect to http pipeline technique and chunk transfer. More... | |
class | restinio_err_category_t |
Error category for asio compatible error codes. More... | |
class | sendfile_operation_base_t |
Base class for storing sendfile operation context. More... | |
class | sendfile_operation_runner_base_t |
A base runner of sendfile operation (keeps all the data). More... | |
class | sendfile_operation_runner_t |
A runner of sendfile operation. More... | |
class | sendfile_operation_runner_t< asio_ns::ip::tcp::socket > |
A specialization for plain tcp-socket using linux sendfile() (http://man7.org/linux/man-pages/man2/sendfile.2.html). More... | |
struct | sendfile_write_operation_t |
Send file operation wrapper. More... | |
class | shared_datasizeable_buf_t |
Buffer based on shared_ptr of data-sizeable entity. More... | |
class | socket_supplier_t |
class | socket_supplier_t< tls_socket_t > |
A custom socket storage for tls_socket_t. More... | |
class | tls_socket_t |
Socket adapter for asio::ssl::stream< asio::ip::tcp::socket >. More... | |
class | writable_base_t |
A base class for writable items. More... | |
class | write_group_output_ctx_t |
Helper class for writting response data. More... | |
Typedefs | |
using | string_buf_t = datasizeable_buf_t< std::string > |
An alias for a std::string instantiation of datasizeable_buf_t<D> template. More... | |
using | fmt_minimal_memory_buffer_buf_t = datasizeable_buf_t< fmt_minimal_memory_buffer_t > |
An alias for a fmt_minimal_memory_buffer_t instantiation of datasizeable_buf_t<D> template. More... | |
using | connection_handle_t = std::shared_ptr< connection_base_t > |
Alias for http connection handle. More... | |
template<typename Traits > | |
using | connection_settings_handle_t = std::shared_ptr< connection_settings_t< Traits > > |
using | write_groups_container_t = std::vector< write_group_t > |
using | sendfile_operation_shared_ptr_t = std::shared_ptr< sendfile_operation_base_t > |
using | after_sendfile_cb_t = std::function< void(const asio_ns::error_code &, file_size_t) > |
Callback type for invocation when sendfile operation completes. More... | |
using | asio_bufs_container_t = std::vector< asio_ns::const_buffer > |
Enumerations | |
enum class | connection_upgrade_stage_t : std::uint8_t { none , pending_upgrade_handling , wait_for_upgrade_handling_result_or_nothing } |
Enum for a flag specifying that connection is going to upgrade or not. More... | |
enum class | content_length_field_presence_t : std::uint8_t { add_content_length , skip_content_length } |
Functions | |
void | append_last_field_accessor (http_header_fields_t &, string_view_t) |
template<typename Io_Context_Holder , typename Traits > | |
void | run (ioctx_on_thread_pool_t< Io_Context_Holder > &pool, run_on_thread_pool_settings_t< Traits > &&settings) |
An implementation of run-function for thread pool case. More... | |
template<typename Io_Context_Holder , typename Traits > | |
void | run_with_break_signal_handling (ioctx_on_thread_pool_t< Io_Context_Holder > &pool, http_server_t< Traits > &server) |
An implementation of run-function for thread pool case with existing http_server instance. More... | |
template<typename Io_Context_Holder , typename Traits > | |
void | run_without_break_signal_handling (ioctx_on_thread_pool_t< Io_Context_Holder > &pool, http_server_t< Traits > &server) |
An implementation of run-function for thread pool case with existing http_server instance. More... | |
template<typename Http_Methods > | |
http_parser_settings | create_parser_settings () noexcept |
Include parser callbacks. More... | |
template<typename Connection , typename Start_Read_CB , typename Failed_CB > | |
void | prepare_connection_and_start_read (asio_ns::ip::tcp::socket &, Connection &, Start_Read_CB start_read_cb, Failed_CB) |
tls_socket_t * | make_tls_socket_pointer_for_state_listener (asio_ns::ip::tcp::socket &) noexcept |
template<std::size_t N> | |
constexpr std::size_t | ct_string_len (const char(&)[N]) noexcept |
Compile time c-string length. More... | |
std::size_t | calculate_approx_buffer_size_for_header (const http_response_header_t &h) noexcept |
Calculate buffer size that is enough for serializing the buffer. More... | |
std::string | create_header_string (const http_response_header_t &h, content_length_field_presence_t content_length_field_presence=content_length_field_presence_t::add_content_length, std::size_t buffer_size=0) |
Creates a string for http response header. More... | |
auto | create_not_implemented_resp () |
auto | create_timeout_resp () |
template<typename Error_Type > | |
auto | make_error_code (const Error_Type &e) noexcept |
bool | is_equal_caseless (const char *a, const char *b, std::size_t size) noexcept |
Comparator for fields names. More... | |
bool | is_equal_caseless (const char *a, std::size_t a_size, const char *b, std::size_t b_size) noexcept |
Comparator for fields names. More... | |
bool | is_equal_caseless (string_view_t a, string_view_t b) noexcept |
Comparator for fields names. More... | |
template<typename C > | |
RESTINIO_NODISCARD const C * | to_lower_lut () |
RESTINIO_NODISCARD char | to_lower_case (char ch) |
RESTINIO_NODISCARD char | to_lower_case (unsigned char ch) |
template<typename Extra_Data > | |
connection_handle_t & | access_req_connection (generic_request_t< Extra_Data > &) noexcept |
tls_socket_t * | make_tls_socket_pointer_for_state_listener (tls_socket_t &socket) noexcept |
const char * | modified_memchr (int chr, const char *from, const char *to) |
Variables | |
constexpr std::size_t | buffer_storage_align |
constexpr std::size_t | needed_storage_max_size |
An of memory that is to be enough to hold any possible buffer entity. More... | |
using restinio::impl::after_sendfile_cb_t = typedef std::function< void ( const asio_ns::error_code & , file_size_t ) > |
Callback type for invocation when sendfile operation completes.
Definition at line 39 of file sendfile_operation.hpp.
using restinio::impl::asio_bufs_container_t = typedef std::vector< asio_ns::const_buffer > |
Definition at line 28 of file write_group_output_ctx.hpp.
using restinio::impl::connection_handle_t = typedef std::shared_ptr< connection_base_t > |
Alias for http connection handle.
Definition at line 47 of file connection_base.hpp.
using restinio::impl::connection_settings_handle_t = typedef std::shared_ptr< connection_settings_t< Traits > > |
Definition at line 234 of file connection_settings.hpp.
using restinio::impl::fmt_minimal_memory_buffer_buf_t = typedef datasizeable_buf_t< fmt_minimal_memory_buffer_t > |
An alias for a fmt_minimal_memory_buffer_t instantiation of datasizeable_buf_t<D> template.
Used to figure out buffer_storage_align and needed_storage_max_size constants.
Definition at line 263 of file buffers.hpp.
using restinio::impl::sendfile_operation_shared_ptr_t = typedef std::shared_ptr< sendfile_operation_base_t > |
Definition at line 36 of file sendfile_operation.hpp.
using restinio::impl::string_buf_t = typedef datasizeable_buf_t< std::string > |
An alias for a std::string instantiation of datasizeable_buf_t<D> template.
Used to figure out buffer_storage_align and needed_storage_max_size constants.
Definition at line 256 of file buffers.hpp.
using restinio::impl::write_groups_container_t = typedef std::vector< write_group_t > |
Definition at line 30 of file response_coordinator.hpp.
|
strong |
Enum for a flag specifying that connection is going to upgrade or not.
Definition at line 205 of file connection.hpp.
|
strong |
Enumerator | |
---|---|
add_content_length | |
skip_content_length |
Definition at line 33 of file header_helpers.hpp.
|
noexcept |
Definition at line 477 of file request_handler.hpp.
void restinio::impl::append_last_field_accessor | ( | http_header_fields_t & | , |
string_view_t | |||
) |
|
inlinenoexcept |
Calculate buffer size that is enough for serializing the buffer.
Definition at line 45 of file header_helpers.hpp.
|
inline |
Creates a string for http response header.
Definition at line 68 of file header_helpers.hpp.
|
inline |
Definition at line 156 of file header_helpers.hpp.
|
inlinenoexcept |
Include parser callbacks.
Helper for setting parser settings.
Is used to initialize const value in connection_settings_t ctor.
Definition at line 152 of file connection.hpp.
|
inline |
Definition at line 170 of file header_helpers.hpp.
|
inlineconstexprnoexcept |
Compile time c-string length.
Definition at line 28 of file header_helpers.hpp.
|
inlinenoexcept |
Comparator for fields names.
Definition at line 40 of file string_caseless_compare.hpp.
|
inlinenoexcept |
Comparator for fields names.
Definition at line 62 of file string_caseless_compare.hpp.
|
inlinenoexcept |
Comparator for fields names.
Definition at line 82 of file string_caseless_compare.hpp.
|
noexcept |
Definition at line 88 of file sendfile_operation.hpp.
|
inlinenoexcept |
Definition at line 277 of file connection.hpp.
|
inlinenoexcept |
Definition at line 27 of file uri_helpers.hpp.
void restinio::impl::prepare_connection_and_start_read | ( | asio_ns::ip::tcp::socket & | , |
Connection & | , | ||
Start_Read_CB | start_read_cb, | ||
Failed_CB | |||
) |
Definition at line 265 of file connection.hpp.
void restinio::impl::run | ( | ioctx_on_thread_pool_t< Io_Context_Holder > & | pool, |
run_on_thread_pool_settings_t< Traits > && | settings | ||
) |
An implementation of run-function for thread pool case.
This function receives an already created thread pool object and creates and runs http-server on this thread pool.
Definition at line 303 of file http_server_run.hpp.
void restinio::impl::run_with_break_signal_handling | ( | ioctx_on_thread_pool_t< Io_Context_Holder > & | pool, |
http_server_t< Traits > & | server | ||
) |
An implementation of run-function for thread pool case with existing http_server instance.
This function receives an already created thread pool object and already created http-server and run it on this thread pool.
Definition at line 520 of file http_server_run.hpp.
void restinio::impl::run_without_break_signal_handling | ( | ioctx_on_thread_pool_t< Io_Context_Holder > & | pool, |
http_server_t< Traits > & | server | ||
) |
An implementation of run-function for thread pool case with existing http_server instance.
This function receives an already created thread pool object and already created http-server and run it on this thread pool.
Definition at line 577 of file http_server_run.hpp.
|
inline |
Definition at line 39 of file to_lower_lut.hpp.
|
inline |
Definition at line 48 of file to_lower_lut.hpp.
RESTINIO_NODISCARD const C * restinio::impl::to_lower_lut | ( | ) |
Definition at line 13 of file to_lower_lut.hpp.
|
constexpr |
Definition at line 378 of file buffers.hpp.
|
constexpr |
An of memory that is to be enough to hold any possible buffer entity.
Definition at line 388 of file buffers.hpp.