COROIO: coroio/backends/kqueue.hpp Source File
COROIO
 
Loading...
Searching...
No Matches
kqueue.hpp
1#pragma once
2
3#include <sys/types.h>
4#include <sys/event.h>
5#include <sys/time.h>
6
7#include <coroio/poller.hpp>
8#include <coroio/socket.hpp>
9
10namespace NNet {
11
36class TKqueue: public TPollerBase {
37public:
60 void Poll();
61
62private:
63 int Fd_;
64 std::vector<THandlePair> InEvents_;
65 std::vector<struct kevent> ChangeList_;
66 std::vector<struct kevent> OutEvents_;
67};
68
69} // namespace NNet
Asynchronous file handle that owns its file descriptor.
Definition socket.hpp:317
Poller implementation using kqueue (for macOS and FreeBSD).
Definition kqueue.hpp:36
~TKqueue()
Destroys the TKqueue instance.
void Poll()
Polls for I/O events using kqueue.
TKqueue()
Constructs the TKqueue instance.
Base class for pollers managing asynchronous I/O events and timers.
Definition poller.hpp:52
High-level asynchronous socket for network communication.
Definition socket.hpp:364