return E_SUCCESS;
}
+int event_check(t_event *event,int fd) {
+
+ if(FD_ISSET(fd,&(event->wfds))|FD_ISSET(fd,&(event->rfds))) return E_FD_YES;
+ else return E_FD_NO;
+
+}
+
int event_stop(t_event *event) {
dprintf(event->outfd,"[event] shutdown\n");
#define CALLBACK_ERROR -1
#define E_ERROR -1
#define E_SUCCESS 1
+#define E_FD_YES 2
+#define E_FD_NO 3
/* event status */
#define DISABLED 0
int event_start(t_event *event,void *ptr,
int (*callback0)(t_event *event,void *ptr),
int (*callback1)(t_event *event,void *ptr));
+int event_check(t_event *event,int fd);
int event_stop(t_event *event);
#endif