-class SelectAIO : public aio_mgr {
- public :
-
- SelectAIO();
- ~SelectAIO();
- void watch_fd(int fd, poll_flag flag);
- bool unwatch_fd(int fd, poll_flag flag);
- bool is_watched(int fd, poll_flag flag);
- void wait_ready(std::vector<int> *readable, std::vector<int> *writable);
-
- private:
-
- fd_set rfds_;
- fd_set wfds_;
- int highfds_;
- int pipefd_[2];
-
- std::mutex m_;
-
-};
-
-#ifdef __linux__
-class EPollAIO : public aio_mgr {
- public:
- EPollAIO();
- ~EPollAIO();
- void watch_fd(int fd, poll_flag flag);
- bool unwatch_fd(int fd, poll_flag flag);
- bool is_watched(int fd, poll_flag flag);
- void wait_ready(std::vector<int> *readable, std::vector<int> *writable);
-
- private:
- int pollfd_;
- struct epoll_event ready_[MAX_POLL_FDS];
- int fdstatus_[MAX_POLL_FDS];
-
-};
-#endif /* __linux */
-
-#endif /* pollmgr_h */
-