Loading src/event/epoll.cpp +0 −18 Changes for src/event/epoll.cpp: 0 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -365,15 +365,8 @@ namespace netplus { // for SETTINGS and the server waits for the browser. if (auto *sslsock = dynamic_cast<ssl*>(c->csock.get())) { const auto &fcb = sslsock->getFramingCallback(); std::cerr << "[EPOLL] handshake done, alpn=\"" << sslsock->getSelectedAlpn() << "\" hasFCB=" << (bool)fcb << " sendData.empty=" << c->SendData.empty() << " fd=" << fd << std::endl; if (fcb && c->SendData.empty()) { std::string init = fcb(sslsock->getSelectedAlpn(), 0, "", ""); std::cerr << "[EPOLL] framing callback returned " << init.size() << " bytes" << std::endl; if (!init.empty()) { c->SendData.append(init.data(), init.size()); } Loading Loading @@ -402,14 +395,10 @@ namespace netplus { if (!wouldBlock && rcv == 0) { // True EOF — peer closed the connection std::cerr << "[EPOLL] Step3: recvData returned 0 (EOF) fd=" << fd << std::endl; needClose = true; } else if (rcv > 0) { std::cerr << "[EPOLL] Step3: received " << rcv << " app bytes fd=" << fd << std::endl; c->RecvData.append(buf.data.buf, rcv); evconnection->RequestEvent(*c, tid, args); } else if (wouldBlock) { std::cerr << "[EPOLL] Step3: wouldBlock fd=" << fd << std::endl; } // Continue only if there are more buffered records Loading @@ -421,10 +410,6 @@ namespace netplus { // Always attempt to send if there is data queued // (browsers require the server's HTTP/2 SETTINGS before // sending their request, so we must not wait for EPOLLOUT) std::cerr << "[EPOLL] Step4 check: SendData=" << c->SendData.size() << " pendingWrite=" << c->csock->hasPendingWrite() << " needClose=" << needClose << " fd=" << fd << std::endl; if ((!c->SendData.empty() || c->csock->hasPendingWrite()) && !needClose) { if (c->csock->hasPendingWrite()) { try { Loading Loading @@ -469,9 +454,6 @@ namespace netplus { } } catch (NetException& e) { std::cerr << "[EPOLL] exception: " << e.what() << " type=" << e.getErrorType() << " fd=" << fd << std::endl; if (e.getErrorType() == NetException::Note) { int ev = EPOLLIN | EPOLLRDHUP | EPOLLONESHOT; if (c->csock->hasPendingWrite() || !c->SendData.empty()) Loading Loading
src/event/epoll.cpp +0 −18 Changes for src/event/epoll.cpp: 0 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -365,15 +365,8 @@ namespace netplus { // for SETTINGS and the server waits for the browser. if (auto *sslsock = dynamic_cast<ssl*>(c->csock.get())) { const auto &fcb = sslsock->getFramingCallback(); std::cerr << "[EPOLL] handshake done, alpn=\"" << sslsock->getSelectedAlpn() << "\" hasFCB=" << (bool)fcb << " sendData.empty=" << c->SendData.empty() << " fd=" << fd << std::endl; if (fcb && c->SendData.empty()) { std::string init = fcb(sslsock->getSelectedAlpn(), 0, "", ""); std::cerr << "[EPOLL] framing callback returned " << init.size() << " bytes" << std::endl; if (!init.empty()) { c->SendData.append(init.data(), init.size()); } Loading Loading @@ -402,14 +395,10 @@ namespace netplus { if (!wouldBlock && rcv == 0) { // True EOF — peer closed the connection std::cerr << "[EPOLL] Step3: recvData returned 0 (EOF) fd=" << fd << std::endl; needClose = true; } else if (rcv > 0) { std::cerr << "[EPOLL] Step3: received " << rcv << " app bytes fd=" << fd << std::endl; c->RecvData.append(buf.data.buf, rcv); evconnection->RequestEvent(*c, tid, args); } else if (wouldBlock) { std::cerr << "[EPOLL] Step3: wouldBlock fd=" << fd << std::endl; } // Continue only if there are more buffered records Loading @@ -421,10 +410,6 @@ namespace netplus { // Always attempt to send if there is data queued // (browsers require the server's HTTP/2 SETTINGS before // sending their request, so we must not wait for EPOLLOUT) std::cerr << "[EPOLL] Step4 check: SendData=" << c->SendData.size() << " pendingWrite=" << c->csock->hasPendingWrite() << " needClose=" << needClose << " fd=" << fd << std::endl; if ((!c->SendData.empty() || c->csock->hasPendingWrite()) && !needClose) { if (c->csock->hasPendingWrite()) { try { Loading Loading @@ -469,9 +454,6 @@ namespace netplus { } } catch (NetException& e) { std::cerr << "[EPOLL] exception: " << e.what() << " type=" << e.getErrorType() << " fd=" << fd << std::endl; if (e.getErrorType() == NetException::Note) { int ev = EPOLLIN | EPOLLRDHUP | EPOLLONESHOT; if (c->csock->hasPendingWrite() || !c->SendData.empty()) Loading