Commit 7a7f1e1f authored by jan.koester's avatar jan.koester
Browse files

test

parent f9acc68a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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');
+1 −0
Original line number Diff line number Diff line
@@ -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;