VWeb/Includes/EPollManager.h

17 lines
364 B
C++

#pragma once
#include <sys/epoll.h>
namespace VWeb {
class EPollManager {
public:
EPollManager();
~EPollManager();
[[nodiscard]] bool Dispatch(int sock, uint32_t eventType = EPOLLIN) const;
[[nodiscard]] bool UpdateEvents(int sock, uint32_t eventType = EPOLLIN) const;
int Wait(int idx, epoll_event *events) const;
protected:
int m_EpollID{-1};
};
}