libevent-2.1.12-stable
|
Potentially non-threadsafe versions of the functions in event.h: provided only for backwards compatibility. More...
Go to the source code of this file.
Macros | |
#define | EVENT_FD(ev) |
#define | EVENT_SIGNAL(ev) |
#define | evsignal_set(ev, x, cb, arg) |
#define | evtimer_set(ev, cb, arg) |
timeout_* macros | |
| |
#define | timeout_add(ev, tv) |
#define | timeout_del(ev) |
#define | timeout_initialized(ev) |
#define | timeout_pending(ev, tv) |
#define | timeout_set(ev, cb, arg) |
signal_* macros | |
| |
#define | signal_add(ev, tv) |
#define | signal_del(ev) |
#define | signal_initialized(ev) |
#define | signal_pending(ev, tv) |
#define | signal_set(ev, x, cb, arg) |
Functions | |
EVENT2_EXPORT_SYMBOL int | event_dispatch (void) |
Loop to process events. | |
EVENT2_EXPORT_SYMBOL const char * | event_get_method (void) |
Get the kernel event notification mechanism used by Libevent. | |
EVENT2_EXPORT_SYMBOL struct event_base * | event_init (void) |
Initialize the event API. | |
EVENT2_EXPORT_SYMBOL int | event_loop (int) |
Handle events. | |
EVENT2_EXPORT_SYMBOL int | event_loopbreak (void) |
Abort the active event_loop() immediately. | |
EVENT2_EXPORT_SYMBOL int | event_loopexit (const struct timeval *) |
Exit the event loop after the specified time. | |
EVENT2_EXPORT_SYMBOL int | event_once (evutil_socket_t, short, void(*)(evutil_socket_t, short, void *), void *, const struct timeval *) |
Schedule a one-time event to occur. | |
EVENT2_EXPORT_SYMBOL int | event_priority_init (int) |
Set the number of different event priorities. | |
EVENT2_EXPORT_SYMBOL void | event_set (struct event *, evutil_socket_t, short, void(*)(evutil_socket_t, short, void *), void *) |
Prepare an event structure to be added. |
Potentially non-threadsafe versions of the functions in event.h: provided only for backwards compatibility.
In the oldest versions of Libevent, event_base was not a first-class structure. Instead, there was a single event base that every function manipulated. Later, when separate event bases were added, the old functions that didn't take an event_base argument needed to work by manipulating the "current" event base. This could lead to thread-safety issues, and obscure, hard-to-diagnose bugs.
#define EVENT_FD | ( | ev | ) |
#define EVENT_SIGNAL | ( | ev | ) |
#define evsignal_set | ( | ev, | |
x, | |||
cb, | |||
arg ) |
#define evtimer_set | ( | ev, | |
cb, | |||
arg ) |
#define signal_add | ( | ev, | |
tv ) |
#define signal_del | ( | ev | ) |
#define signal_initialized | ( | ev | ) |
#define signal_pending | ( | ev, | |
tv ) |
#define signal_set | ( | ev, | |
x, | |||
cb, | |||
arg ) |
#define timeout_add | ( | ev, | |
tv ) |
#define timeout_del | ( | ev | ) |
#define timeout_initialized | ( | ev | ) |
#define timeout_pending | ( | ev, | |
tv ) |
#define timeout_set | ( | ev, | |
cb, | |||
arg ) |
EVENT2_EXPORT_SYMBOL int event_dispatch | ( | void | ) |
Loop to process events.
Like event_base_dispatch(), but uses the "current" base.
EVENT2_EXPORT_SYMBOL const char * event_get_method | ( | void | ) |
Get the kernel event notification mechanism used by Libevent.
EVENT2_EXPORT_SYMBOL struct event_base * event_init | ( | void | ) |
Initialize the event API.
The event API needs to be initialized with event_init() before it can be used. Sets the global current base that gets used for events that have no base associated with them.
EVENT2_EXPORT_SYMBOL int event_loop | ( | int | ) |
Handle events.
This function behaves like event_base_loop(), but uses the "current" base
EVENT2_EXPORT_SYMBOL int event_loopbreak | ( | void | ) |
Abort the active event_loop() immediately.
This function behaves like event_base_loopbreakt(), except that it uses the "current" base.
EVENT2_EXPORT_SYMBOL int event_loopexit | ( | const struct timeval * | ) |
Exit the event loop after the specified time.
This function behaves like event_base_loopexit(), except that it uses the "current" base.
EVENT2_EXPORT_SYMBOL int event_once | ( | evutil_socket_t | , |
short | , | ||
void(* | )(evutil_socket_t, short, void *), | ||
void * | , | ||
const struct timeval * | ) |
Schedule a one-time event to occur.
EVENT2_EXPORT_SYMBOL int event_priority_init | ( | int | ) |
Set the number of different event priorities.
EVENT2_EXPORT_SYMBOL void event_set | ( | struct event * | , |
evutil_socket_t | , | ||
short | , | ||
void(* | )(evutil_socket_t, short, void *), | ||
void * | ) |
Prepare an event structure to be added.