I use epoll for prototyping a little TCP server, just for pedagogic purposes.
epoll has a function int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);. When used with the operation (op) EPOLL_CTL_ADD, the function add the fd to the list of fd watched by epoll.
On my side, I have written a wrapper class for epoll in C++, which provides some useful functions, including Epoll::add_connection(int fd). This function call epoll_ctl() and add the fd passed as parameter in the epoll instance.
So, my question:
Epoll::add_connection(int fd) doesn't modify an instance of my class, no attributes are modified. But, since my class represent more or less epoll itself, in a way the instance is modified...
Should I mark this function const or not ?