Maurice Grönwoldt
5bb68a7d02
We have no make install support... so we don't need to have everything as a single-header and lib file.
17 lines
364 B
C++
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};
|
|
};
|
|
} |