OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::Gremlin::DelayedQueue Struct Reference

#include <gremlin.hpp>

Inheritance diagram for openvpn::Gremlin::DelayedQueue:
[legend]
Collaboration diagram for openvpn::Gremlin::DelayedQueue:
[legend]

Classes

struct  Event
 
struct  EventBase
 

Public Types

typedef RCPtr< DelayedQueuePtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 DelayedQueue (openvpn_io::io_context &io_context, const unsigned int delay_ms)
 
template<class F >
void queue (F &&func_arg)
 
size_t size () const
 
void stop ()
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_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 Member Functions

void set_timer ()
 

Private Attributes

Time::Duration dur
 
AsioTimer next_event
 
std::deque< std::unique_ptr< EventBase > > events
 

Additional Inherited Members

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

Detailed Description

Definition at line 32 of file gremlin.hpp.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ DelayedQueue()

openvpn::Gremlin::DelayedQueue::DelayedQueue ( openvpn_io::io_context &  io_context,
const unsigned int  delay_ms 
)
inline

Definition at line 37 of file gremlin.hpp.

Member Function Documentation

◆ queue()

template<class F >
void openvpn::Gremlin::DelayedQueue::queue ( F &&  func_arg)
inline

Definition at line 45 of file gremlin.hpp.

◆ set_timer()

void openvpn::Gremlin::DelayedQueue::set_timer ( )
inlineprivate

Definition at line 96 of file gremlin.hpp.

Here is the caller graph for this function:

◆ size()

size_t openvpn::Gremlin::DelayedQueue::size ( ) const
inline

Definition at line 53 of file gremlin.hpp.

◆ stop()

void openvpn::Gremlin::DelayedQueue::stop ( )
inline

Definition at line 58 of file gremlin.hpp.

Member Data Documentation

◆ dur

Time::Duration openvpn::Gremlin::DelayedQueue::dur
private

Definition at line 113 of file gremlin.hpp.

◆ events

std::deque<std::unique_ptr<EventBase> > openvpn::Gremlin::DelayedQueue::events
private

Definition at line 115 of file gremlin.hpp.

◆ next_event

AsioTimer openvpn::Gremlin::DelayedQueue::next_event
private

Definition at line 114 of file gremlin.hpp.


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