I'm writing an application using epoll and large amount of fd's. in order to improve the searches of fd to application relevant DB, I want to pass to epoll application info, such as index in DB array. I thought of using the data->ptr (epoll_data_t --> *ptr), as far as I understood, I can give pointer that holds the fd and private information from the application layer, but couldn't found any documents or examples.
I found this post, which seems to be relevant, but there is no implementation example... How to use epoll_event data.ptr
Thanks