OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ASIOSignals Class Reference

#include <asiosignal.hpp>

Inheritance diagram for openvpn::ASIOSignals:
[legend]
Collaboration diagram for openvpn::ASIOSignals:
[legend]

Public Types

enum  {
  S_SIGINT = (1 << 0) , S_SIGTERM = (1 << 1) , S_SIGQUIT = (1 << 2) , S_SIGHUP = (1 << 3) ,
  S_SIGUSR1 = (1 << 4) , S_SIGUSR2 = (1 << 5)
}
 
typedef RCPtr< ASIOSignalsPtr
 
- Public Types inherited from openvpn::RC< thread_safe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 ASIOSignals (openvpn_io::io_context &io_context)
 
template<typename SignalHandler >
void register_signals (SignalHandler stop_handler, unsigned int sigmask=(S_SIGINT|S_SIGTERM))
 
template<typename SignalHandler >
void register_signals_all (SignalHandler stop_handler)
 
void cancel ()
 
- Public Member Functions inherited from openvpn::RC< thread_safe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Private Attributes

bool halt
 
openvpn_io::signal_set signals_
 

Additional Inherited Members

- Static Public Member Functions inherited from openvpn::RC< thread_safe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Detailed Description

Definition at line 25 of file asiosignal.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 28 of file asiosignal.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
S_SIGINT 
S_SIGTERM 
S_SIGQUIT 
S_SIGHUP 
S_SIGUSR1 
S_SIGUSR2 

Definition at line 35 of file asiosignal.hpp.

Constructor & Destructor Documentation

◆ ASIOSignals()

openvpn::ASIOSignals::ASIOSignals ( openvpn_io::io_context &  io_context)
inline

Definition at line 30 of file asiosignal.hpp.

Member Function Documentation

◆ cancel()

void openvpn::ASIOSignals::cancel ( )
inline

Definition at line 81 of file asiosignal.hpp.

Here is the caller graph for this function:

◆ register_signals()

template<typename SignalHandler >
void openvpn::ASIOSignals::register_signals ( SignalHandler  stop_handler,
unsigned int  sigmask = (S_SIGINT | S_SIGTERM) 
)
inline

Definition at line 48 of file asiosignal.hpp.

Here is the caller graph for this function:

◆ register_signals_all()

template<typename SignalHandler >
void openvpn::ASIOSignals::register_signals_all ( SignalHandler  stop_handler)
inline

Definition at line 68 of file asiosignal.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ halt

bool openvpn::ASIOSignals::halt
private

Definition at line 91 of file asiosignal.hpp.

◆ signals_

openvpn_io::signal_set openvpn::ASIOSignals::signals_
private

Definition at line 92 of file asiosignal.hpp.


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