|
Electroneum
|
Go to the source code of this file.
Macros | |
| #define | UB_EV_TIMEOUT 0x01 |
| #define | UB_EV_READ 0x02 |
| #define | UB_EV_WRITE 0x04 |
| #define | UB_EV_SIGNAL 0x08 |
| #define | UB_EV_PERSIST 0x10 |
Functions | |
| const char * | ub_event_get_version (void) |
| void | ub_get_event_sys (struct ub_event_base *, const char **n, const char **s, const char **m) |
| struct ub_event_base * | ub_default_event_base (int, time_t *, struct timeval *) |
| struct ub_event_base * | ub_libevent_event_base (struct event_base *) |
| struct event_base * | ub_libevent_get_event_base (struct ub_event_base *) |
| void | ub_event_base_free (struct ub_event_base *) |
| int | ub_event_base_dispatch (struct ub_event_base *) |
| int | ub_event_base_loopexit (struct ub_event_base *) |
| struct ub_event * | ub_event_new (struct ub_event_base *, int fd, short bits, void(*cb)(int, short, void *), void *arg) |
| struct ub_event * | ub_signal_new (struct ub_event_base *, int fd, void(*cb)(int, short, void *), void *arg) |
| struct ub_event * | ub_winsock_register_wsaevent (struct ub_event_base *, void *wsaevent, void(*cb)(int, short, void *), void *arg) |
| void | ub_event_add_bits (struct ub_event *, short bits) |
| void | ub_event_del_bits (struct ub_event *, short bits) |
| void | ub_event_set_fd (struct ub_event *, int fd) |
| void | ub_event_free (struct ub_event *) |
| int | ub_event_add (struct ub_event *, struct timeval *) |
| int | ub_event_del (struct ub_event *) |
| int | ub_timer_add (struct ub_event *, struct ub_event_base *, void(*cb)(int, short, void *), void *arg, struct timeval *) |
| int | ub_timer_del (struct ub_event *) |
| int | ub_signal_add (struct ub_event *, struct timeval *) |
| int | ub_signal_del (struct ub_event *) |
| void | ub_winsock_unregister_wsaevent (struct ub_event *ev) |
| void | ub_winsock_tcp_wouldblock (struct ub_event *, int bits) |
| void | ub_comm_base_now (struct comm_base *cb) |
This file contains prototypes for event loop functions.
Definition in file ub_event.h.
| #define UB_EV_PERSIST 0x10 |
event must persist
Definition at line 60 of file ub_event.h.
| #define UB_EV_READ 0x02 |
event fd readable
Definition at line 54 of file ub_event.h.
| #define UB_EV_SIGNAL 0x08 |
event signal
Definition at line 58 of file ub_event.h.
| #define UB_EV_TIMEOUT 0x01 |
event timeout
Definition at line 52 of file ub_event.h.
| #define UB_EV_WRITE 0x04 |
event fd writable
Definition at line 56 of file ub_event.h.
| struct ub_event_base* ub_default_event_base | ( | int | , |
| time_t * | , | ||
| struct timeval * | |||
| ) |
Return a default event base. In the daemon this will be the only event bases used.
| int ub_event_add | ( | struct ub_event * | , |
| struct timeval * | |||
| ) |
Activate the event. The given timeval is an timeout value.
| void ub_event_add_bits | ( | struct ub_event * | , |
| short | bits | ||
| ) |
Add event bits for this event to fire on
| int ub_event_base_dispatch | ( | struct ub_event_base * | ) |
Run the event base
| void ub_event_base_free | ( | struct ub_event_base * | ) |
Free event base. Free events yourself
| int ub_event_base_loopexit | ( | struct ub_event_base * | ) |
exit that loop
| int ub_event_del | ( | struct ub_event * | ) |
Deactivate the event
| void ub_event_del_bits | ( | struct ub_event * | , |
| short | bits | ||
| ) |
Configure the event so it will not longer fire on given bits
| void ub_event_free | ( | struct ub_event * | ) |
free the event
| const char* ub_event_get_version | ( | void | ) |
Returns event-base type. Could be "mini-event", "winsock-event" for the daemon compile, and will be "pluggable-event<PACKAGE_VERSION>" for libunbound.
| struct ub_event* ub_event_new | ( | struct ub_event_base * | , |
| int | fd, | ||
| short | bits, | ||
| void(*)(int, short, void *) | cb, | ||
| void * | arg | ||
| ) |
Create a new ub_event for the event base
| void ub_event_set_fd | ( | struct ub_event * | , |
| int | fd | ||
| ) |
Change or set the file descriptor on the event
| void ub_get_event_sys | ( | struct ub_event_base * | , |
| const char ** | n, | ||
| const char ** | s, | ||
| const char ** | m | ||
| ) |
Return the name, system and method for the pluggable event base
| struct ub_event_base* ub_libevent_event_base | ( | struct event_base * | ) |
Return an ub_event_base constructed for the given libevent event base
| struct event_base* ub_libevent_get_event_base | ( | struct ub_event_base * | ) |
Return the libevent base underlying the given ub_event_base. Will return NULL when the ub_event_base does not have an underlying libevent event base
| int ub_signal_add | ( | struct ub_event * | , |
| struct timeval * | |||
| ) |
Activate a signal event
| int ub_signal_del | ( | struct ub_event * | ) |
Deactivate a signal event
| struct ub_event* ub_signal_new | ( | struct ub_event_base * | , |
| int | fd, | ||
| void(*)(int, short, void *) | cb, | ||
| void * | arg | ||
| ) |
Create a new ub_event signal for the event base
| int ub_timer_add | ( | struct ub_event * | , |
| struct ub_event_base * | , | ||
| void(*)(int, short, void *) | cb, | ||
| void * | arg, | ||
| struct timeval * | |||
| ) |
Reconfigure and activate a timeout event
| int ub_timer_del | ( | struct ub_event * | ) |
Deactivate the timeout event
| struct ub_event* ub_winsock_register_wsaevent | ( | struct ub_event_base * | , |
| void * | wsaevent, | ||
| void(*)(int, short, void *) | cb, | ||
| void * | arg | ||
| ) |
Create a new ub_event associated with the wsaevent for the event base
| void ub_winsock_tcp_wouldblock | ( | struct ub_event * | , |
| int | bits | ||
| ) |
Signal the eventloop when a TCP windows socket will block on next read or write (given by the eventbits)
| void ub_winsock_unregister_wsaevent | ( | struct ub_event * | ev | ) |
Free a with a wsaevent associated event