Skip to content

Commit

Permalink
Create file handle
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Dec 5, 2023
1 parent b33d211 commit 789c763
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 135 deletions.
1 change: 1 addition & 0 deletions coroio/epoll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace NNet {
class TEPoll: public TPollerBase {
public:
using TSocket = NNet::TSocket;
using TFileHandle = NNet::TFileHandle;

TEPoll()
: Fd_(epoll_create1(EPOLL_CLOEXEC))
Expand Down
1 change: 1 addition & 0 deletions coroio/kqueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace NNet {
class TKqueue: public TPollerBase {
public:
using TSocket = NNet::TSocket;
using TFileHandle = NNet::TFileHandle;

TKqueue()
: Fd_(kqueue())
Expand Down
1 change: 1 addition & 0 deletions coroio/poll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace NNet {
class TPoll: public TPollerBase {
public:
using TSocket = NNet::TSocket;
using TFileHandle = NNet::TFileHandle;

void Poll() {
auto deadline = Timers_.empty() ? TTime::max() : Timers_.top().Deadline;
Expand Down
1 change: 1 addition & 0 deletions coroio/select.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace NNet {
class TSelect: public TPollerBase {
public:
using TSocket = NNet::TSocket;
using TFileHandle = NNet::TFileHandle;

void Poll() {
auto deadline = Timers_.empty() ? TTime::max() : Timers_.top().Deadline;
Expand Down
Loading

0 comments on commit 789c763

Please sign in to comment.