5 #ifndef TPOOL_EVENT_IF_H_ 6 #define TPOOL_EVENT_IF_H_ int event_if_getfd(EventHandler handler)
get fd related to handler
void event_if_loopbreak(EventInstance this)
break main loop
void * EventHandler
Event handler related to fd.
EventHandler event_if_add(EventInstance this, EventSubscriber subscriber, void *arg)
add event handler related to fd
This is API as ThreadPool data definition for ThreadPooldesign petten by using libevent.
int event_if_loop(EventInstance this)
main loop, start to watch event
void event_if_exit(EventInstance this)
exit instances for loop, if plugin want.
EventHandler event_if_update(EventInstance this, EventHandler handler, EventSubscriber subscriber, void *arg)
update event handler related to fd
EventSubscriber class instance definition, this is storaged in any threads.
EventInstance event_if_new(void)
new event instance
void * EventInstance
Event management instance which get from event_if_new.
void event_if_del(EventInstance this, EventHandler handler)
delete event handler related to fd
void event_if_free(EventInstance this)
free instances