Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
joedb::asio::Server Class Referenceabstract

Superclass for asio servers. More...

#include <joedb/asio/Server.h>

Inheritance diagram for joedb::asio::Server:
Inheritance graph
[legend]
Collaboration diagram for joedb::asio::Server:
Collaboration graph
[legend]

Classes

class  Session
 

Public Member Functions

 Server (Logger &logger, int log_level, int thread_count, std::string endpoint_path)
 
int get_log_level () const
 
const std::string & get_endpoint_path () const
 
bool is_joined () const
 
void stop ()
 
void join ()
 
virtual void cleanup_after_join ()
 
virtual ~Server ()
 

Protected Member Functions

void log (std::string_view s)
 
virtual std::unique_ptr< Sessionnew_session (boost::asio::local::stream_protocol::socket &&socket)=0
 

Protected Attributes

Loggerlogger
 
const int log_level
 
const int thread_count
 
boost::asio::thread_pool thread_pool
 
bool joined
 
const std::string endpoint_path
 
boost::asio::local::stream_protocol::endpoint endpoint
 
boost::asio::local::stream_protocol::acceptor acceptor
 
boost::asio::signal_set interrupt_signals
 

Detailed Description

Definition at line 18 of file Server.h.

Constructor & Destructor Documentation

◆ Server()

joedb::asio::Server::Server ( Logger logger,
int  log_level,
int  thread_count,
std::string  endpoint_path 
)

Definition at line 114 of file Server.cpp.

◆ ~Server()

joedb::asio::Server::~Server ( )
virtual

Reimplemented in joedb::Server.

Definition at line 178 of file Server.cpp.

Member Function Documentation

◆ cleanup_after_join()

void joedb::asio::Server::cleanup_after_join ( )
virtual

Reimplemented in joedb::Server.

Definition at line 174 of file Server.cpp.

◆ get_endpoint_path()

const std::string & joedb::asio::Server::get_endpoint_path ( ) const
inline

Definition at line 85 of file Server.h.

◆ get_log_level()

int joedb::asio::Server::get_log_level ( ) const
inline

Definition at line 80 of file Server.h.

◆ is_joined()

bool joedb::asio::Server::is_joined ( ) const
inline

Definition at line 90 of file Server.h.

◆ join()

void joedb::asio::Server::join ( )

Definition at line 166 of file Server.cpp.

◆ log()

void joedb::asio::Server::log ( std::string_view  s)
protected

Definition at line 12 of file Server.cpp.

◆ new_session()

virtual std::unique_ptr< Session > joedb::asio::Server::new_session ( boost::asio::local::stream_protocol::socket &&  socket)
protectedpure virtual

Implemented in joedb::rpc::Server.

◆ stop()

void joedb::asio::Server::stop ( )

Definition at line 160 of file Server.cpp.

Member Data Documentation

◆ acceptor

boost::asio::local::stream_protocol::acceptor joedb::asio::Server::acceptor
protected

Definition at line 31 of file Server.h.

◆ endpoint

boost::asio::local::stream_protocol::endpoint joedb::asio::Server::endpoint
protected

Definition at line 30 of file Server.h.

◆ endpoint_path

const std::string joedb::asio::Server::endpoint_path
protected

Definition at line 29 of file Server.h.

◆ interrupt_signals

boost::asio::signal_set joedb::asio::Server::interrupt_signals
protected

Definition at line 32 of file Server.h.

◆ joined

bool joedb::asio::Server::joined
protected

Definition at line 27 of file Server.h.

◆ log_level

const int joedb::asio::Server::log_level
protected

Definition at line 22 of file Server.h.

◆ logger

Logger& joedb::asio::Server::logger
protected

Definition at line 21 of file Server.h.

◆ thread_count

const int joedb::asio::Server::thread_count
protected

Definition at line 25 of file Server.h.

◆ thread_pool

boost::asio::thread_pool joedb::asio::Server::thread_pool
protected

Definition at line 26 of file Server.h.


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