RESTinio
Classes | Namespaces | Typedefs | Enumerations | Functions
http_server_run.hpp File Reference

Helper function for simple run of HTTP server. More...

#include <restinio/impl/ioctx_on_thread_pool.hpp>
#include <restinio/http_server.hpp>

Go to the source code of this file.

Classes

class  restinio::run_on_this_thread_settings_t< Traits >
 Settings for the case when http_server must be run on the context of the current thread. More...
 
class  restinio::run_on_thread_pool_settings_t< Traits >
 Settings for the case when http_server must be run on the context of the current thread. More...
 
class  restinio::run_existing_server_on_thread_pool_t< Traits >
 Helper type for holding parameters necessary for running HTTP-server on a thread pool. More...
 
class  restinio::on_pool_runner_t< Http_Server >
 Helper class for running an existing HTTP-server on a thread pool without blocking the current thread. More...
 
class  restinio::running_server_instance_t< Http_Server >
 A helper class used in an implementation of run_async function. More...
 

Namespaces

namespace  restinio
 
namespace  restinio::impl
 

Typedefs

template<typename Traits >
using restinio::running_server_handle_t = std::unique_ptr< running_server_instance_t< http_server_t< Traits > > >
 The type to be used as a handle for running server instance. More...
 

Enumerations

enum class  restinio::break_signal_handling_t { restinio::used , restinio::skipped }
 Indication of usage of break signal handlers for some forms of run functions. More...
 

Functions

constexpr break_signal_handling_t restinio::use_break_signal_handling () noexcept
 Make the indicator for usage of break signal handler. More...
 
constexpr break_signal_handling_t restinio::skip_break_signal_handling () noexcept
 Make the indicator for absence of break signal handler. More...
 
template<typename Traits = default_single_thread_traits_t>
run_on_this_thread_settings_t< Traits > restinio::on_this_thread ()
 A special marker for the case when http_server must be run on the context of the current thread. More...
 
template<typename Traits = default_traits_t>
run_on_thread_pool_settings_t< Traits > restinio::on_thread_pool (std::size_t pool_size)
 A special marker for the case when http_server must be run on an thread pool. More...
 
template<typename Traits >
void restinio::run (asio_ns::io_context &ioctx, run_on_this_thread_settings_t< Traits > &&settings)
 Helper function for running http server until ctrl+c is hit. More...
 
template<typename Traits >
void restinio::run (run_on_this_thread_settings_t< Traits > &&settings)
 Helper function for running http server until ctrl+c is hit. More...
 
template<typename Io_Context_Holder , typename Traits >
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. More...
 
template<typename Traits >
void restinio::run (run_on_thread_pool_settings_t< Traits > &&settings)
 Helper function for running http server until ctrl+c is hit. More...
 
template<typename Traits >
void restinio::run (asio_ns::io_context &ioctx, run_on_thread_pool_settings_t< Traits > &&settings)
 Helper function for running http server until ctrl+c is hit. More...
 
template<typename Traits >
run_existing_server_on_thread_pool_t< Traits > restinio::on_thread_pool (std::size_t pool_size, break_signal_handling_t break_handling, http_server_t< Traits > &server)
 Helper function for running an existing HTTP-server on a thread pool. More...
 
template<typename Io_Context_Holder , typename Traits >
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. More...
 
template<typename Io_Context_Holder , typename Traits >
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. More...
 
template<typename Traits >
void restinio::run (run_existing_server_on_thread_pool_t< Traits > &&params)
 Helper function for running an existing HTTP-server on a thread pool. More...
 
template<typename Traits >
void restinio::initiate_shutdown (http_server_t< Traits > &server)
 Helper function for initiation of server shutdown. More...
 
template<typename Traits = default_traits_t>
RESTINIO_NODISCARD running_server_handle_t< Traits > restinio::run_async (io_context_holder_t io_context, server_settings_t< Traits > &&settings, std::size_t thread_pool_size)
 Creates an instance of HTTP-server and launches it on a separate thread or thread pool. More...
 

Detailed Description

Helper function for simple run of HTTP server.

Definition in file http_server_run.hpp.