#include <stdint.h>
Go to the source code of this file.
◆ EV_EXCEPTIONAL
#define EV_EXCEPTIONAL (1 << 2) |
◆ EV_READABLE
#define EV_READABLE (1 << 0) |
◆ EV_WRITABLE
#define EV_WRITABLE (1 << 1) |
◆ event_ptr
typedef int(* event_ptr) (void *h, int fd) |
◆ event_system
◆ fd_event
contains a function pointer to a callback function and a file descriptor
◆ rasta
◆ timed_event
contains a function pointer to a callback function and interval in microseconds
◆ add_fd_event()
Add a fd event to an event system. A event can only be in one event system at a time. (not thread safe)
- Parameters
-
ev_sys | the event will be added to this event system |
event | the event to add |
options | set how the event should be triggered. (EV_READABLE | EV_WRITABLE | EV_CHANGE) |
◆ add_timed_event()
Add a timed event to an event system. A event can only be in one event system at a time. (not thread safe)
- Parameters
-
ev_sys | the event will be added to this event system |
event | the event to add |
◆ disable_fd_event()
void disable_fd_event |
( |
fd_event * |
event | ) |
|
enables a fd event
- Parameters
-
◆ disable_timed_event()
disables a timed event
- Parameters
-
event | the event to disable |
◆ enable_fd_event()
void enable_fd_event |
( |
fd_event * |
event | ) |
|
enables a fd event
- Parameters
-
◆ enable_timed_event()
enables a timed event, it will fire in event::interval nanoseconds
- Parameters
-
◆ rasta_add_fd_event()
void rasta_add_fd_event |
( |
rasta * |
h, |
|
|
fd_event * |
event, |
|
|
int |
options |
|
) |
| |
◆ rasta_remove_fd_event()
◆ remove_fd_event()
Removes a fd event from its event system. (not thread safe)
- Parameters
-
ev_sys | the event will be added to this event system |
event | the event to add |
◆ remove_timed_event()
Removes a timed event from its event system. (not thread safe)
- Parameters
-
ev_sys | the event will be added to this event system |
event | the event to add |