147 files changed, 55964 insertions, 55946 deletions
diff --git a/tvapi/libtv/tvutils/zepoll.h b/tvapi/libtv/tvutils/zepoll.h index cf4ebac..9ba4c25 100644 --- a/tvapi/libtv/tvutils/zepoll.h +++ b/tvapi/libtv/tvutils/zepoll.h @@ -9,37 +9,36 @@ /** * @brief The Epoll class 对epoll的封装 */ -class Epoll -{ +class Epoll { public: - /** - * - */ - enum EPOLL_OP {ADD = EPOLL_CTL_ADD, MOD = EPOLL_CTL_MOD, DEL = EPOLL_CTL_DEL}; - /** - * 最大的连接数和最大的回传事件数 - */ - Epoll(int _max = 30, int maxevents = 20); - ~Epoll(); - int create(); - int add(int fd, epoll_event *event); - int mod(int fd, epoll_event *event); - int del(int fd, epoll_event *event); - void setTimeout(int timeout); - void setMaxEvents(int maxevents); - int wait(); - const epoll_event *events() const; - const epoll_event &operator[](int index) - { - return backEvents[index]; - } + /** + * + */ + enum EPOLL_OP {ADD = EPOLL_CTL_ADD, MOD = EPOLL_CTL_MOD, DEL = EPOLL_CTL_DEL}; + /** + * 最大的连接数和最大的回传事件数 + */ + Epoll(int _max = 30, int maxevents = 20); + ~Epoll(); + int create(); + int add(int fd, epoll_event *event); + int mod(int fd, epoll_event *event); + int del(int fd, epoll_event *event); + void setTimeout(int timeout); + void setMaxEvents(int maxevents); + int wait(); + const epoll_event *events() const; + const epoll_event &operator[](int index) + { + return backEvents[index]; + } private: - bool isValid() const; - int max; - int epoll_fd; - int epoll_timeout; - int epoll_maxevents; - epoll_event *backEvents; + bool isValid() const; + int max; + int epoll_fd; + int epoll_timeout; + int epoll_maxevents; + epoll_event *backEvents; }; |