RESTinio
Loading...
Searching...
No Matches
restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager > Class Template Reference

Helper type for controlling the lifetime of the connection. More...

#include <connection_count_limiter.hpp>

Public Member Functions

 connection_lifetime_monitor_t (not_null_pointer_t< Count_Manager > manager) noexcept
 ~connection_lifetime_monitor_t ()
 connection_lifetime_monitor_t (const connection_lifetime_monitor_t &)=delete
 connection_lifetime_monitor_t (connection_lifetime_monitor_t &&other) noexcept
connection_lifetime_monitor_toperator= (connection_lifetime_monitor_t &&other) noexcept
connection_lifetime_monitor_toperator= (const connection_lifetime_monitor_t &)=delete

Private Attributes

not_null_pointer_t< Count_Manager > m_manager

Friends

void swap (connection_lifetime_monitor_t &a, connection_lifetime_monitor_t &b) noexcept

Detailed Description

template<typename Count_Manager>
class restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >

Helper type for controlling the lifetime of the connection.

Connection count limiter should be informed when a new connection created and when an existing connection is closed. An instance of connection_lifetime_monitor_t should be used for that purpose: a new instance of connection_lifetime_monitor_t should be created and bound to a connection object. The constructor of connection_lifetime_monitor_t will inform the limiter about the creation of a new connection. The destructor of connection_lifetime_monitor_t will inform the limiter about the destruction of a connection.

Note
This type is not Copyable but Movabale.
Attention
The pointer to Count_Manager passed to the constructor should remain valid the whole lifetime of connection_lifetime_monitor_t instance.
Since
v.0.6.12

Definition at line 374 of file connection_count_limiter.hpp.

Constructor & Destructor Documentation

◆ connection_lifetime_monitor_t() [1/3]

template<typename Count_Manager>
restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::connection_lifetime_monitor_t ( not_null_pointer_t< Count_Manager > manager)
inlinenoexcept

Definition at line 379 of file connection_count_limiter.hpp.

◆ ~connection_lifetime_monitor_t()

template<typename Count_Manager>
restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::~connection_lifetime_monitor_t ( )
inline

Definition at line 386 of file connection_count_limiter.hpp.

◆ connection_lifetime_monitor_t() [2/3]

template<typename Count_Manager>
restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::connection_lifetime_monitor_t ( const connection_lifetime_monitor_t< Count_Manager > & )
delete

◆ connection_lifetime_monitor_t() [3/3]

template<typename Count_Manager>
restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::connection_lifetime_monitor_t ( connection_lifetime_monitor_t< Count_Manager > && other)
inlinenoexcept

Definition at line 404 of file connection_count_limiter.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<typename Count_Manager>
connection_lifetime_monitor_t & restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::operator= ( connection_lifetime_monitor_t< Count_Manager > && other)
inlinenoexcept

Definition at line 412 of file connection_count_limiter.hpp.

◆ operator=() [2/2]

template<typename Count_Manager>
connection_lifetime_monitor_t & restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::operator= ( const connection_lifetime_monitor_t< Count_Manager > & )
delete

◆ swap

template<typename Count_Manager>
void swap ( connection_lifetime_monitor_t< Count_Manager > & a,
connection_lifetime_monitor_t< Count_Manager > & b )
friend

Definition at line 396 of file connection_count_limiter.hpp.

Member Data Documentation

◆ m_manager

template<typename Count_Manager>
not_null_pointer_t< Count_Manager > restinio::connection_count_limits::connection_lifetime_monitor_t< Count_Manager >::m_manager
private

Definition at line 376 of file connection_count_limiter.hpp.


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