Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Event class. More...

#include <httpserver.h>

Public Member Functions

 HTTPEvent (struct event_base *base, bool deleteWhenTriggered, const std::function< void(void)> &handler)
 Create a new event. More...
 
 ~HTTPEvent ()
 
void trigger (struct timeval *tv)
 Trigger the event. More...
 

Public Attributes

bool deleteWhenTriggered
 
std::function< void(void)> handler
 

Private Attributes

struct event * ev
 

Detailed Description

Event class.

This can be used either as a cross-thread trigger or as a timer.

Definition at line 130 of file httpserver.h.

Constructor & Destructor Documentation

◆ HTTPEvent()

HTTPEvent::HTTPEvent ( struct event_base *  base,
bool  deleteWhenTriggered,
const std::function< void(void)> &  handler 
)

Create a new event.

deleteWhenTriggered deletes this event object after the event is triggered (and the handler called) handler is the handler to call when the event is triggered.

Definition at line 501 of file httpserver.cpp.

References ev, and httpevent_callback_fn().

◆ ~HTTPEvent()

HTTPEvent::~HTTPEvent ( )

Definition at line 507 of file httpserver.cpp.

References ev.

Member Function Documentation

◆ trigger()

void HTTPEvent::trigger ( struct timeval *  tv)

Trigger the event.

If tv is 0, trigger it immediately. Otherwise trigger it after the given time has elapsed.

Definition at line 511 of file httpserver.cpp.

References ev.

Referenced by HTTPRPCTimer::HTTPRPCTimer(), and HTTPRequest::WriteReply().

Member Data Documentation

◆ deleteWhenTriggered

bool HTTPEvent::deleteWhenTriggered

Definition at line 145 of file httpserver.h.

◆ ev

struct event* HTTPEvent::ev
private

Definition at line 148 of file httpserver.h.

Referenced by HTTPEvent(), trigger(), and ~HTTPEvent().

◆ handler

std::function<void(void)> HTTPEvent::handler

Definition at line 146 of file httpserver.h.

Referenced by httpevent_callback_fn().


The documentation for this class was generated from the following files:
Released under the MIT license