roar
|
This factory creates sessions. More...
#include <factory.hpp>
Classes | |
struct | Implementation |
struct | ProtoSession |
Public Member Functions | |
Factory (std::optional< std::variant< SslServerContext, boost::asio::ssl::context > > &sslContext, std::function< void(Error &&)> onError) | |
ROAR_PIMPL_SPECIAL_FUNCTIONS (Factory) | |
void | makeSession (boost::asio::basic_stream_socket< boost::asio::ip::tcp > &&socket, std::weak_ptr< Router > router, std::shared_ptr< const StandardResponseProvider > standardResponseProvider) |
Creates a new http session. | |
Static Public Attributes | |
static constexpr std::chrono::seconds | sslDetectionTimeout {10} |
Private Attributes | |
std::unique_ptr< Implementation > | impl_ |
This factory creates sessions.
Roar::Factory::Factory | ( | std::optional< std::variant< SslServerContext, boost::asio::ssl::context > > & | sslContext, |
std::function< void(Error &&)> | onError | ||
) |
void Roar::Factory::makeSession | ( | boost::asio::basic_stream_socket< boost::asio::ip::tcp > && | socket, |
std::weak_ptr< Router > | router, | ||
std::shared_ptr< const StandardResponseProvider > | standardResponseProvider | ||
) |
Creates a new http session.
socket | A socket for this session |
router | A weak reference to the router. |
standardResponseProvider | A standard response provider. |
Roar::Factory::ROAR_PIMPL_SPECIAL_FUNCTIONS | ( | Factory | ) |
|
private |
|
staticconstexpr |