RESTinio
|
Namespaces | |
namespace | acceptor_details |
namespace | connection_settings_details |
namespace | overflow_controlled_integer_accumulator_details |
namespace | pool_size_checking |
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. | |
using | fmt_minimal_memory_buffer_buf_t |
An alias for a fmt_minimal_memory_buffer_t instantiation of datasizeable_buf_t<D> template. | |
using | connection_handle_t = std::shared_ptr< connection_base_t > |
Alias for http connection handle. | |
template<typename Traits> | |
using | connection_settings_handle_t |
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 |
Callback type for invocation when sendfile operation completes. | |
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. | |
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. | |
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. | |
restinio::impl::http_parser_ctx_t * | get_http_parser_ctx (llhttp_t *parser) |
Include parser callbacks. | |
int | restinio_url_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_header_field_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_header_field_complete_cb (llhttp_t *parser) |
int | restinio_header_value_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_header_value_complete_cb (llhttp_t *parser) |
int | restinio_headers_complete_cb (llhttp_t *parser) |
int | restinio_body_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_chunk_header_cb (llhttp_t *parser) |
int | restinio_chunk_complete_cb (llhttp_t *) |
template<typename Http_Methods> | |
int | restinio_message_complete_cb (llhttp_t *parser) |
template<typename Http_Methods> | |
llhttp_settings_t | create_parser_settings () noexcept |
Helper for setting parser settings. | |
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. | |
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. | |
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. | |
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. | |
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. | |
bool | is_equal_caseless (string_view_t a, string_view_t b) noexcept |
Comparator for fields names. | |
template<typename C> | |
const C * | to_lower_lut () |
char | to_lower_case (char ch) |
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) |
Chunked encoding callbacks. | |
| |
int | restinio_chunk_extension_name_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_chunk_extension_name_complete_cb (llhttp_t *parser) |
int | restinio_chunk_extension_value_cb (llhttp_t *parser, const char *at, size_t length) |
int | restinio_chunk_extension_value_complete_cb (llhttp_t *) |
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. |
Callback type for invocation when sendfile operation completes.
Definition at line 39 of file sendfile_operation.hpp.
using restinio::impl::asio_bufs_container_t = std::vector< asio_ns::const_buffer > |
Definition at line 28 of file write_group_output_ctx.hpp.
using restinio::impl::connection_handle_t = 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 |
Definition at line 234 of file connection_settings.hpp.
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 264 of file buffers.hpp.
using restinio::impl::sendfile_operation_shared_ptr_t = std::shared_ptr< sendfile_operation_base_t > |
Definition at line 36 of file sendfile_operation.hpp.
using restinio::impl::string_buf_t = 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 257 of file buffers.hpp.
using restinio::impl::write_groups_container_t = std::vector< write_group_t > |
Definition at line 31 of file response_coordinator.hpp.
|
strong |
Enum for a flag specifying that connection is going to upgrade or not.
Definition at line 249 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 486 of file request_handler.hpp.
|
inline |
Definition at line 103 of file connection.hpp.
|
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 |
Helper for setting parser settings.
Is used to initialize const value in connection_settings_t ctor.
Definition at line 166 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.
|
inlinenodiscard |
Include parser callbacks.
A helper function to get the pointer to a context object.
Definition at line 10 of file connection.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 324 of file connection.hpp.
|
inlinenoexcept |
|
inline |
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 312 of file connection.hpp.
|
inline |
Definition at line 179 of file connection.hpp.
|
inline |
Definition at line 235 of file connection.hpp.
|
inline |
Definition at line 269 of file connection.hpp.
|
inline |
Definition at line 305 of file connection.hpp.
|
inline |
Definition at line 324 of file connection.hpp.
|
inline |
Definition at line 349 of file connection.hpp.
|
inline |
Definition at line 204 of file connection.hpp.
|
inline |
Definition at line 44 of file connection.hpp.
|
inline |
Definition at line 73 of file connection.hpp.
|
inline |
Definition at line 109 of file connection.hpp.
|
inline |
Definition at line 138 of file connection.hpp.
|
inline |
Definition at line 146 of file connection.hpp.
int restinio::impl::restinio_message_complete_cb | ( | llhttp_t * | parser | ) |
Definition at line 243 of file connection.hpp.
|
inline |
Callbacks used with http parser.
Definition at line 21 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.
|
inlinenodiscard |
Definition at line 39 of file to_lower_lut.hpp.
|
inlinenodiscard |
Definition at line 48 of file to_lower_lut.hpp.
|
nodiscard |
Definition at line 13 of file to_lower_lut.hpp.
|
constexpr |
Definition at line 379 of file buffers.hpp.
|
constexpr |
An of memory that is to be enough to hold any possible buffer entity.
Definition at line 389 of file buffers.hpp.