in my program I add an event as below:
conn_ev = (struct event *)malloc(sizeof(struct event));
event_set(conn_ev, connfd, EV_READ, on_recv, conn_ev);
event_base_set(base, conn_ev);
if(event_add(conn_ev, NULL) == -1){
fprintf(stderr, "event_add(conn_ev) error!\n");
goto EXCEPTION;
}
later, if another condition is satisfied, I need to delete all events that are related to connfd
,
is it possible to search events by socket number?
and how to delete these events?
thanks!