roar
Loading...
Searching...
No Matches
Public Attributes | List of all members
Roar::Server::ConstructionArguments Struct Reference

#include <server.hpp>

Collaboration diagram for Roar::Server::ConstructionArguments:

Public Attributes

boost::asio::any_io_executor executor
 Required io executor for boost::asio.
 
std::optional< std::variant< SslServerContext, boost::asio::ssl::context > > sslContext
 Supply for SSL support.
 
std::function< void(Error &&)> onError = [](auto&&) {}
 Called when an error occurs in an asynchronous routine.
 
std::function< void(boost::system::error_code)> onAcceptAbort = [](auto) {}
 Called when the server stops accepting connections for error reasons.
 
std::unique_ptr< StandardResponseProviderstandardResponseProvider
 

Member Data Documentation

◆ executor

boost::asio::any_io_executor Roar::Server::ConstructionArguments::executor

Required io executor for boost::asio.

◆ onAcceptAbort

std::function<void(boost::system::error_code)> Roar::Server::ConstructionArguments::onAcceptAbort = [](auto) {}

Called when the server stops accepting connections for error reasons.

◆ onError

std::function<void(Error&&)> Roar::Server::ConstructionArguments::onError = [](auto&&) {}

Called when an error occurs in an asynchronous routine.

◆ sslContext

std::optional<std::variant<SslServerContext, boost::asio::ssl::context> > Roar::Server::ConstructionArguments::sslContext

Supply for SSL support.

◆ standardResponseProvider

std::unique_ptr<StandardResponseProvider> Roar::Server::ConstructionArguments::standardResponseProvider
Initial value:
=
std::make_unique<StandardTextResponseProvider>()

Sometimes the server has to respond with error codes outside the library users scope. So this class provides responses for errors like 404 or 500.


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