libusual  0.1
Data Structures | Defines | Typedefs | Enumerations
usual/event.h File Reference

libevent compat. More...

Data Structures

struct  event
 Event structure for internal event loop. More...

Defines

#define EVENT_FD(ev)
 Read fd value from struct event.
#define EVENT_SIGNAL(ev)
 Read signal value from struct event.

Typedefs

typedef void(* uevent_cb_f )(int fd, short flags, void *arg)
 user callback signature

Enumerations

enum  EventFlags
 Flags for event_set() / event_assign(): EV_READ, EV_WRITE, EV_SIGNAL, EV_PERSIST. More...
enum  EventLoopType
 Flags for event_loop() More...

Detailed Description

libevent compat.

This module adds few functions to older libevent versions, or provides it's own libevent-compatible event loop for cases where performance and features of full libevent are not needed.


Define Documentation

#define EVENT_FD (   ev)

Read fd value from struct event.

#define EVENT_SIGNAL (   ev)

Read signal value from struct event.


Typedef Documentation

typedef void(* uevent_cb_f)(int fd, short flags, void *arg)

user callback signature


Enumeration Type Documentation

enum EventFlags

Flags for event_set() / event_assign(): EV_READ, EV_WRITE, EV_SIGNAL, EV_PERSIST.

Flags given to user callback: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT.

Flags for event_loop()