plebble
us::gov::socket::queue_t Struct Reference

#include <send_queue.h>

Inheritance diagram for us::gov::socket::queue_t:
Collaboration diagram for us::gov::socket::queue_t:

Classes

struct  ongoing_t
 

Public Types

typedef pri_q_t b
 
typedef bgtask t
 

Public Member Functions

 queue_t ()
 
 ~queue_t () override
 
ko send (datagram *d, client *cli, uint16_t pri)
 
qinext ()
 
qinext_ ()
 
qireplace (qi *)
 
size_t get_size () const
 
void wait ()
 
void dump (const string &prefix, ostream &) const
 
void clear ()
 
void purge (client *)
 
void run ()
 
void onwakeup ()
 
void set_busy_handler (busyled_t::handler_t *hsend)
 
- Public Member Functions inherited from us::gov::bgtask
 bgtask ()
 
 bgtask (function< void()> run, function< void()> onwakeup)
 
virtual ~bgtask ()
 
void set_run_function (function< void()> r)
 
virtual ko start ()
 
virtual ko wait_ready (const chrono::system_clock::time_point &deadline) const
 
virtual void stop ()
 
virtual void join ()
 
void wakeup ()
 
bool isup () const
 
bool isdown () const
 
bool resumed () const
 
void run_ ()
 
void reset ()
 
bool reset_wait ()
 
bool reset_resume ()
 
bool is_active () const
 
 bgtask ()
 
 bgtask (callback cb0)
 
void set_callback (callback r)
 
ko start ()
 
ko wait_ready (Date deadline)
 
void stop ()
 
void join ()
 
boolean reset_wait ()
 
void wakeup ()
 
boolean reset_resume ()
 
boolean isup ()
 
boolean isdown ()
 
boolean resumed ()
 
void reset ()
 
boolean is_active ()
 

Public Attributes

condition_variable cv
 
mutex mx
 
ongoing_t ongoing
 
busyled_t busyled
 

Static Public Attributes

static constexpr size_t wmh {CFG_SENDQ_WMH}
 
static constexpr size_t schunk {CFG_SENDQ_SCHUNK}
 
- Static Public Attributes inherited from us::gov::bgtask
static const char * KO_81021
 
static ko KO_81021 =new ko("KO 81021 Ready status never reached.")
 

Additional Inherited Members

- Protected Attributes inherited from us::gov::bgtask
atomic< short > resume {0}
 
thread * th {nullptr}
 
bool active {false}
 
function< void()> run
 
function< void()> onwakeup
 
mutex mx_ready
 
bool ready {false}
 
condition_variable cv_ready
 
AtomicInteger resume =new AtomicInteger(0)
 
Thread th =null
 
boolean active =false
 
callback cb =null
 
ReentrantLock mx_ready = new ReentrantLock()
 
boolean ready =false
 
Condition cv_ready =mx_ready.newCondition()
 

Member Typedef Documentation

◆ b

◆ t

Constructor & Destructor Documentation

◆ queue_t()

us::gov::socket::queue_t::queue_t ( )

◆ ~queue_t()

us::gov::socket::queue_t::~queue_t ( )
override

Member Function Documentation

◆ clear()

void us::gov::socket::queue_t::clear ( )

◆ dump()

void us::gov::socket::queue_t::dump ( const string &  prefix,
ostream &   
) const

◆ get_size()

size_t us::gov::socket::queue_t::get_size ( ) const

◆ next()

qi* us::gov::socket::queue_t::next ( )

◆ next_()

qi* us::gov::socket::queue_t::next_ ( )

◆ onwakeup()

void us::gov::socket::queue_t::onwakeup ( )

◆ purge()

void us::gov::socket::queue_t::purge ( client )

◆ replace()

qi* us::gov::socket::queue_t::replace ( qi )

◆ run()

void us::gov::socket::queue_t::run ( )

Reimplemented from us::gov::bgtask.

◆ send()

ko us::gov::socket::queue_t::send ( datagram d,
client cli,
uint16_t  pri 
)

Referenced by us::gov::socket::client::send1().

Here is the caller graph for this function:

◆ set_busy_handler()

void us::gov::socket::queue_t::set_busy_handler ( busyled_t::handler_t hsend)

Referenced by us::gov::cli::rpc_api::set_busy_handlers().

Here is the caller graph for this function:

◆ wait()

void us::gov::socket::queue_t::wait ( )

Member Data Documentation

◆ busyled

busyled_t us::gov::socket::queue_t::busyled

◆ cv

condition_variable us::gov::socket::queue_t::cv

◆ mx

mutex us::gov::socket::queue_t::mx
mutable

◆ ongoing

ongoing_t us::gov::socket::queue_t::ongoing

◆ schunk

constexpr size_t us::gov::socket::queue_t::schunk {CFG_SENDQ_SCHUNK}
staticconstexpr

◆ wmh

constexpr size_t us::gov::socket::queue_t::wmh {CFG_SENDQ_WMH}
staticconstexpr

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