mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
RequestServer+LibHTTP+LibGemini: Cache connections to the same host
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).
This commit is contained in:
parent
c5d7eb8618
commit
65f7e45a75
22 changed files with 295 additions and 51 deletions
|
@ -20,6 +20,7 @@ public:
|
|||
static NonnullOwnPtr<HttpRequest> create_with_job(Badge<HttpProtocol>&&, ClientConnection&, NonnullRefPtr<HTTP::HttpJob>, NonnullOwnPtr<OutputFileStream>&&);
|
||||
|
||||
HTTP::HttpJob& job() { return m_job; }
|
||||
HTTP::HttpJob const& job() const { return m_job; }
|
||||
|
||||
private:
|
||||
explicit HttpRequest(ClientConnection&, NonnullRefPtr<HTTP::HttpJob>, NonnullOwnPtr<OutputFileStream>&&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue