Loading src/quic.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -2534,7 +2534,7 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) { // holding it across the registry insertion below closes a race where // another thread could find this connection via the registry and // start touching its state before we've finished initializing it. auto child_ptr = std::make_shared<quic>(); auto child_ptr = createChild(); std::unique_lock<std::recursive_mutex> child_lock(child_ptr->quic_mtx()); // Configure the new connection Loading Loading @@ -7183,6 +7183,17 @@ std::vector<uint8_t> quic::buildAlpnExtension(const std::string& /*alpn*/) { return {}; } // ============================================================================ // Server accept(): factory for the child connection's dynamic type // ============================================================================ // Base just makes a plain `quic`. libhttppp overrides this to return a // libhttppp::Http3QuicSocket so accepted connections keep the virtual // overrides above (buildAlpnExtension, sendControlStreams) instead of // silently reverting to their no-op base versions. std::shared_ptr<quic> quic::createChild() const { return std::make_shared<quic>(); } // ============================================================================ // Socket Interface: sendData (Send application data) // ============================================================================ Loading src/socket.h +7 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,13 @@ namespace netplus { // extension sent). libhttppp overrides this with the real // implementation — see libhttppp::Http3QuicSocket. virtual std::vector<uint8_t> buildAlpnExtension(const std::string& alpn); // accept() calls this instead of `std::make_shared<quic>()` so an // accepted connection keeps the listener's own dynamic type (e.g. // libhttppp::Http3QuicSocket) — otherwise sendControlStreams()/ // buildAlpnExtension() silently fall back to the no-op base // implementation on every accepted connection, since virtual // dispatch only helps once the object itself is the derived type. virtual std::shared_ptr<quic> createChild() const; void completeHandshake(); // Packet number handling Loading Loading
src/quic.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -2534,7 +2534,7 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) { // holding it across the registry insertion below closes a race where // another thread could find this connection via the registry and // start touching its state before we've finished initializing it. auto child_ptr = std::make_shared<quic>(); auto child_ptr = createChild(); std::unique_lock<std::recursive_mutex> child_lock(child_ptr->quic_mtx()); // Configure the new connection Loading Loading @@ -7183,6 +7183,17 @@ std::vector<uint8_t> quic::buildAlpnExtension(const std::string& /*alpn*/) { return {}; } // ============================================================================ // Server accept(): factory for the child connection's dynamic type // ============================================================================ // Base just makes a plain `quic`. libhttppp overrides this to return a // libhttppp::Http3QuicSocket so accepted connections keep the virtual // overrides above (buildAlpnExtension, sendControlStreams) instead of // silently reverting to their no-op base versions. std::shared_ptr<quic> quic::createChild() const { return std::make_shared<quic>(); } // ============================================================================ // Socket Interface: sendData (Send application data) // ============================================================================ Loading
src/socket.h +7 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,13 @@ namespace netplus { // extension sent). libhttppp overrides this with the real // implementation — see libhttppp::Http3QuicSocket. virtual std::vector<uint8_t> buildAlpnExtension(const std::string& alpn); // accept() calls this instead of `std::make_shared<quic>()` so an // accepted connection keeps the listener's own dynamic type (e.g. // libhttppp::Http3QuicSocket) — otherwise sendControlStreams()/ // buildAlpnExtension() silently fall back to the no-op base // implementation on every accepted connection, since virtual // dispatch only helps once the object itself is the derived type. virtual std::shared_ptr<quic> createChild() const; void completeHandshake(); // Packet number handling Loading