Loading src/event/epoll.cpp +6 −7 Changes for src/event/epoll.cpp: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -225,13 +225,12 @@ namespace netplus { if (_ServerSocket->_Type == sockettype::TCP) ccon->slots[0].csock = std::make_unique<tcp>(-1); else if (_ServerSocket->_Type == sockettype::SSL) { ssl* srv = static_cast<ssl*>(_ServerSocket); // Share cert_map by pointer — ssl::accept() below replaces this // placeholder wholesale anyway, so avoid deep-copying the whole // certificate map (incl. RSA/EC key material) on every connect. ccon->slots[0].csock = std::make_unique<ssl>(srv->_tls.cert_map); } else if (_ServerSocket->_Type == sockettype::QUIC) { // SSL: no placeholder needed here — ssl::accept() below never reads // the incoming csock, it builds its own child socket (sharing // cert_map by pointer) and overwrites csock wholesale. Pre-building // one here used to deep-copy the whole certificate map (incl. // RSA/EC key material) on every single connect just to throw it away. else if (_ServerSocket->_Type == sockettype::QUIC) { // QUIC: accept() drains up to 512 queued datagrams in // one call (see quic::accept). The listener fd is // registered EPOLLONESHOT (see runEventloop) so we're Loading src/event/kqueue.cpp +6 −7 Changes for src/event/kqueue.cpp: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -357,13 +357,12 @@ namespace netplus { if (_ServerSocket->_Type == sockettype::TCP) ccon->slots[0].csock = std::make_unique<tcp>(-1); else if (_ServerSocket->_Type == sockettype::SSL) { ssl* srv = static_cast<ssl*>(_ServerSocket); // Share cert_map by pointer — ssl::accept() below replaces this // placeholder wholesale anyway, so avoid deep-copying the whole // certificate map (incl. RSA/EC key material) on every connect. ccon->slots[0].csock = std::make_unique<ssl>(srv->_tls.cert_map); } else if (_ServerSocket->_Type == sockettype::QUIC) { // SSL: no placeholder needed here — ssl::accept() below never reads // the incoming csock, it builds its own child socket (sharing // cert_map by pointer) and overwrites csock wholesale. Pre-building // one here used to deep-copy the whole certificate map (incl. // RSA/EC key material) on every single connect just to throw it away. else if (_ServerSocket->_Type == sockettype::QUIC) { // QUIC: All child connections share the parent's UDP socket. // accept() receives packets and either routes to existing children // or creates new ones (owned by parent). We don't register QUIC Loading Loading
src/event/epoll.cpp +6 −7 Changes for src/event/epoll.cpp: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -225,13 +225,12 @@ namespace netplus { if (_ServerSocket->_Type == sockettype::TCP) ccon->slots[0].csock = std::make_unique<tcp>(-1); else if (_ServerSocket->_Type == sockettype::SSL) { ssl* srv = static_cast<ssl*>(_ServerSocket); // Share cert_map by pointer — ssl::accept() below replaces this // placeholder wholesale anyway, so avoid deep-copying the whole // certificate map (incl. RSA/EC key material) on every connect. ccon->slots[0].csock = std::make_unique<ssl>(srv->_tls.cert_map); } else if (_ServerSocket->_Type == sockettype::QUIC) { // SSL: no placeholder needed here — ssl::accept() below never reads // the incoming csock, it builds its own child socket (sharing // cert_map by pointer) and overwrites csock wholesale. Pre-building // one here used to deep-copy the whole certificate map (incl. // RSA/EC key material) on every single connect just to throw it away. else if (_ServerSocket->_Type == sockettype::QUIC) { // QUIC: accept() drains up to 512 queued datagrams in // one call (see quic::accept). The listener fd is // registered EPOLLONESHOT (see runEventloop) so we're Loading
src/event/kqueue.cpp +6 −7 Changes for src/event/kqueue.cpp: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -357,13 +357,12 @@ namespace netplus { if (_ServerSocket->_Type == sockettype::TCP) ccon->slots[0].csock = std::make_unique<tcp>(-1); else if (_ServerSocket->_Type == sockettype::SSL) { ssl* srv = static_cast<ssl*>(_ServerSocket); // Share cert_map by pointer — ssl::accept() below replaces this // placeholder wholesale anyway, so avoid deep-copying the whole // certificate map (incl. RSA/EC key material) on every connect. ccon->slots[0].csock = std::make_unique<ssl>(srv->_tls.cert_map); } else if (_ServerSocket->_Type == sockettype::QUIC) { // SSL: no placeholder needed here — ssl::accept() below never reads // the incoming csock, it builds its own child socket (sharing // cert_map by pointer) and overwrites csock wholesale. Pre-building // one here used to deep-copy the whole certificate map (incl. // RSA/EC key material) on every single connect just to throw it away. else if (_ServerSocket->_Type == sockettype::QUIC) { // QUIC: All child connections share the parent's UDP socket. // accept() receives packets and either routes to existing children // or creates new ones (owned by parent). We don't register QUIC Loading