Cleaned up socket scheduling. Very clean now.

This commit is contained in:
Brad Arant committed 2022-03-15 21:02:35 +00:00
1 parent 4017ee9175
commit 3a6883e77f
8 files changed
+34 -45

No files matched your search

+3 -3
View File
@@ -97,11 +97,11 @@ namespace core {
event.events = EPOLLIN | EPOLLONESHOT | EPOLLRDHUP | EPOLLET;
epoll_ctl(epfd, EPOLL_CTL_ADD, socket->getDescriptor(), &event);
}
void EPoll::disableSocket(Socket *socket) {
epoll_ctl(epfd, EPOLL_CTL_DEL, socket->getDescriptor(), NULL);
}
void EPoll::resetSocket(Socket *socket) {
struct epoll_event event;
event.data.ptr = socket;
@@ -110,5 +110,5 @@ namespace core {
event.events |= EPOLLWRNORM;
epoll_ctl(epfd, EPOLL_CTL_MOD, socket->getDescriptor(), &event);
}
}