EPoll Callback function

Home / Uncategorized / EPoll Callback function

i have a question refering to the following topic: How to pass a callback function pointer to epoll_event structure in C++

I am using the example and try to replace the if/else-block with two callback functions for timer and signal. But I don’t know how.

This is the part of my code:int n = epoll_wait (epollfd, events , num_events, -1 );
for (int i = 0; i < n; ++i) { if (events[i].data.fd == timerfd) { read(....); printf ("Timer %...."); } else (events[i].data.fd == signalfdfd){ read(); } }


Read more

Leave a Reply

Your email address will not be published. Required fields are marked *