Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
HTTPEvent Class Reference

Event class. More...

#include <httpserver.h>

Public Member Functions

 HTTPEvent (struct event_base *base, bool deleteWhenTriggered, struct evbuffer *_databuf, 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 evbuffer * databuf
 
struct event * ev
 

Detailed Description

Event class.

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

Definition at line 159 of file httpserver.h.

Constructor & Destructor Documentation

HTTPEvent::HTTPEvent ( struct event_base *  base,
bool  deleteWhenTriggered,
struct evbuffer *  _databuf,
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 533 of file httpserver.cpp.

Here is the call graph for this function:

HTTPEvent::~HTTPEvent ( )

Definition at line 539 of file httpserver.cpp.

Member Function Documentation

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 546 of file httpserver.cpp.

Here is the caller graph for this function:

Member Data Documentation

struct evbuffer* HTTPEvent::databuf
private

Definition at line 177 of file httpserver.h.

bool HTTPEvent::deleteWhenTriggered

Definition at line 174 of file httpserver.h.

struct event* HTTPEvent::ev
private

Definition at line 178 of file httpserver.h.

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

Definition at line 175 of file httpserver.h.


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