Loading src/event/epoll.cpp +3 −12 Changes for src/event/epoll.cpp: 3 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -93,8 +93,7 @@ namespace netplus { int _Timeout; }; // RAII Rearm (EPOLLONESHOT) - more efficient than level-triggered // Since we batch send operations, re-arming syscalls are amortized // RAII Rearm (EPOLLONESHOT) - manages re-arming on scope exit class EpollArmGuard { public: EpollArmGuard(int fd, std::shared_ptr<con> c, pollapi* pptr) Loading @@ -104,21 +103,13 @@ namespace netplus { if (!_armed) return; if (!_con || !_con->csock) return; int next = EPOLLRDHUP | EPOLLONESHOT; int next = EPOLLRDHUP | EPOLLIN | EPOLLONESHOT; // during handshake => need IN, and OUT only if pending writes if (!_con->csock->getHandshakeDone()) { next |= EPOLLIN; if (_con->csock->hasPendingWrite()) next |= EPOLLOUT; } else { next |= EPOLLIN; // Check if we have pending writes or buffered data if (_con->SendData.pos < _con->SendData.size() || _con->csock->hasPendingWrite()) next |= EPOLLOUT; // If TLS has buffered data, trigger EPOLLOUT to force a wakeup if (_con->csock->hasBufferedData()) next |= EPOLLOUT; } try { _pptr->setpollEventsFd(_fd, next); Loading Loading
src/event/epoll.cpp +3 −12 Changes for src/event/epoll.cpp: 3 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -93,8 +93,7 @@ namespace netplus { int _Timeout; }; // RAII Rearm (EPOLLONESHOT) - more efficient than level-triggered // Since we batch send operations, re-arming syscalls are amortized // RAII Rearm (EPOLLONESHOT) - manages re-arming on scope exit class EpollArmGuard { public: EpollArmGuard(int fd, std::shared_ptr<con> c, pollapi* pptr) Loading @@ -104,21 +103,13 @@ namespace netplus { if (!_armed) return; if (!_con || !_con->csock) return; int next = EPOLLRDHUP | EPOLLONESHOT; int next = EPOLLRDHUP | EPOLLIN | EPOLLONESHOT; // during handshake => need IN, and OUT only if pending writes if (!_con->csock->getHandshakeDone()) { next |= EPOLLIN; if (_con->csock->hasPendingWrite()) next |= EPOLLOUT; } else { next |= EPOLLIN; // Check if we have pending writes or buffered data if (_con->SendData.pos < _con->SendData.size() || _con->csock->hasPendingWrite()) next |= EPOLLOUT; // If TLS has buffered data, trigger EPOLLOUT to force a wakeup if (_con->csock->hasBufferedData()) next |= EPOLLOUT; } try { _pptr->setpollEventsFd(_fd, next); Loading