Commit f2b87941 authored by jan.koester's avatar jan.koester
Browse files

test

parent d8a8c083
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -353,8 +353,9 @@ static std::vector<uint8_t> h3BuildResponse(uint16_t status_code,
    return out;
}

libhttppp::HttpEvent::HttpEvent(std::vector<netplus::socket*> serversocket, int timeout, size_t h2OffloadThreads)
    : netplus::event(serversocket, timeout) {
libhttppp::HttpEvent::HttpEvent(std::vector<netplus::socket*> serversocket, int timeout,
                                 size_t h2OffloadThreads, int idleTimeoutSeconds)
    : netplus::event(serversocket, timeout, idleTimeoutSeconds) {
    if (h2OffloadThreads > 0)
        _h2DispatchPool = std::make_unique<netplus::ThreadPool>(h2OffloadThreads);
    // Bounded like quicDispatchPool() in libnetplus (same rationale: this
+6 −1
Original line number Diff line number Diff line
@@ -56,8 +56,13 @@ namespace libhttppp {
        // round-trip) run without blocking every other stream multiplexed
        // on the same connection. Zero (the default) preserves the original
        // fully-synchronous H2 dispatch behavior for every existing caller.
        // idleTimeoutSeconds: forwarded to netplus::event's own idleTimeoutSeconds (see
        // eventapi.h's doc comment) -- closes an accepted connection once it's gone this long
        // with no genuine read/write activity. 0 (the default) preserves the original
        // behavior: a connection stays open until the peer closes it or a transport error
        // occurs, however long that takes.
        HttpEvent(std::vector<netplus::socket*> serversocket,int timeout = 1000,
                  size_t h2OffloadThreads = 0);
                  size_t h2OffloadThreads = 0, int idleTimeoutSeconds = 0);

        // Return true to have this stream's RequestEvent run on the H2
        // offload thread pool instead of inline in the frame-processing