Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Macros | Functions
events.h File Reference
#include <ios>
#include <memory>
#include <event2/event.h>
#include <event2/http.h>
Include dependency graph for events.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAKE_RAII(type)
 

Functions

 MAKE_RAII (event_base)
 
 MAKE_RAII (event)
 
 MAKE_RAII (evhttp)
 
 MAKE_RAII (evhttp_request)
 
 MAKE_RAII (evhttp_connection)
 
raii_event_base obtain_event_base ()
 
raii_event obtain_event (struct event_base *base, evutil_socket_t s, short events, event_callback_fn cb, void *arg)
 
raii_evhttp obtain_evhttp (struct event_base *base)
 
raii_evhttp_request obtain_evhttp_request (void(*cb)(struct evhttp_request *, void *), void *arg)
 
raii_evhttp_connection obtain_evhttp_connection_base (struct event_base *base, std::string host, uint16_t port)
 

Macro Definition Documentation

◆ MAKE_RAII

#define MAKE_RAII (   type)
Value:
/* deleter */ \
struct type##_deleter { \
void operator()(struct type *ob) { \
type##_free(ob); \
} \
}; \
/* unique ptr typedef */ \
typedef std::unique_ptr<struct type, type##_deleter> raii_##type
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85

Definition at line 14 of file events.h.

Function Documentation

◆ MAKE_RAII() [1/5]

MAKE_RAII ( event  )

◆ MAKE_RAII() [2/5]

MAKE_RAII ( event_base  )

◆ MAKE_RAII() [3/5]

MAKE_RAII ( evhttp  )

◆ MAKE_RAII() [4/5]

MAKE_RAII ( evhttp_connection  )

◆ MAKE_RAII() [5/5]

MAKE_RAII ( evhttp_request  )

◆ obtain_event()

raii_event obtain_event ( struct event_base base,
evutil_socket_t  s,
short  events,
event_callback_fn  cb,
void arg 
)
inline

Definition at line 38 of file events.h.

Here is the call graph for this function:

◆ obtain_event_base()

raii_event_base obtain_event_base ( )
inline

Definition at line 30 of file events.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ obtain_evhttp()

raii_evhttp obtain_evhttp ( struct event_base base)
inline

Definition at line 43 of file events.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ obtain_evhttp_connection_base()

raii_evhttp_connection obtain_evhttp_connection_base ( struct event_base base,
std::string  host,
uint16_t  port 
)
inline

Definition at line 53 of file events.h.

Here is the call graph for this function:

◆ obtain_evhttp_request()

raii_evhttp_request obtain_evhttp_request ( void(*)(struct evhttp_request *, void *)  cb,
void arg 
)
inline

Definition at line 48 of file events.h.

Here is the call graph for this function: