mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
65f7e45a75
This makes connections (particularly TLS-based ones) do the handshaking stuff only once. Currently the cache is configured to keep at most two connections evenly balanced in queue size, and with a grace period of 10s after the last queued job has finished (after which the connection will be dropped).
31 lines
835 B
C++
31 lines
835 B
C++
/*
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Badge.h>
|
|
#include <LibCore/Forward.h>
|
|
#include <LibGemini/Forward.h>
|
|
#include <RequestServer/Request.h>
|
|
|
|
namespace RequestServer {
|
|
|
|
class GeminiRequest final : public Request {
|
|
public:
|
|
virtual ~GeminiRequest() override;
|
|
static NonnullOwnPtr<GeminiRequest> create_with_job(Badge<GeminiProtocol>, ClientConnection&, NonnullRefPtr<Gemini::GeminiJob>, NonnullOwnPtr<OutputFileStream>&&);
|
|
|
|
Gemini::GeminiJob const& job() const { return *m_job; }
|
|
|
|
private:
|
|
explicit GeminiRequest(ClientConnection&, NonnullRefPtr<Gemini::GeminiJob>, NonnullOwnPtr<OutputFileStream>&&);
|
|
|
|
virtual void set_certificate(String certificate, String key) override;
|
|
|
|
NonnullRefPtr<Gemini::GeminiJob> m_job;
|
|
};
|
|
|
|
}
|