roar
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Roar::Factory Class Reference

This factory creates sessions. More...

#include <factory.hpp>

Collaboration diagram for Roar::Factory:

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< Implementationimpl_
 

Detailed Description

This factory creates sessions.

Constructor & Destructor Documentation

◆ Factory()

Roar::Factory::Factory ( std::optional< std::variant< SslServerContext, boost::asio::ssl::context > > &  sslContext,
std::function< void(Error &&)>  onError 
)

Member Function Documentation

◆ makeSession()

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.

Parameters
socketA socket for this session
routerA weak reference to the router.
standardResponseProviderA standard response provider.

◆ ROAR_PIMPL_SPECIAL_FUNCTIONS()

Roar::Factory::ROAR_PIMPL_SPECIAL_FUNCTIONS ( Factory  )

Member Data Documentation

◆ impl_

std::unique_ptr<Implementation> Roar::Factory::impl_
private

◆ sslDetectionTimeout

constexpr std::chrono::seconds Roar::Factory::sslDetectionTimeout {10}
staticconstexpr

The documentation for this class was generated from the following files: