Loading src/httpd.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ std::shared_ptr<netplus::quic> libhttppp::Http3QuicSocket::createChild() const { return std::make_shared<Http3QuicSocket>(); } std::string libhttppp::Http3QuicSocket::selectStreamProtocol(const std::string& proto) { // Accept only HTTP/3 protocols if (proto == "h3" || proto == "h3-29") { return proto; } return ""; // Reject other protocols } static std::string h2BuildFrame(uint8_t type, uint8_t flags, uint32_t stream_id, const std::string &payload) { std::string f(9 + payload.size(), '\0'); Loading src/httpd.h +1 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ namespace libhttppp { using netplus::quic::quic; void sendControlStreams() override; std::vector<uint8_t> buildAlpnExtension(const std::string& alpn) override; std::string selectStreamProtocol(const std::string& proto) override; std::shared_ptr<netplus::quic> createChild() const override; private: bool _ctrlStreamsSent = false; Loading Loading
src/httpd.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ std::shared_ptr<netplus::quic> libhttppp::Http3QuicSocket::createChild() const { return std::make_shared<Http3QuicSocket>(); } std::string libhttppp::Http3QuicSocket::selectStreamProtocol(const std::string& proto) { // Accept only HTTP/3 protocols if (proto == "h3" || proto == "h3-29") { return proto; } return ""; // Reject other protocols } static std::string h2BuildFrame(uint8_t type, uint8_t flags, uint32_t stream_id, const std::string &payload) { std::string f(9 + payload.size(), '\0'); Loading
src/httpd.h +1 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ namespace libhttppp { using netplus::quic::quic; void sendControlStreams() override; std::vector<uint8_t> buildAlpnExtension(const std::string& alpn) override; std::string selectStreamProtocol(const std::string& proto) override; std::shared_ptr<netplus::quic> createChild() const override; private: bool _ctrlStreamsSent = false; Loading