1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:47:35 +00:00

RequestServer+LibProtocol: Make starting requests fully async

This makes it so the clients don't have to wait for RS to become
responsive, potentially allowing them to do other things while RS
handles the connections.
Fixes #23306.
This commit is contained in:
Ali Mohammad Pur 2024-02-24 14:36:57 +01:00 committed by Andreas Kling
parent 18d26142f0
commit 5232afa13d
26 changed files with 114 additions and 87 deletions

View file

@ -16,7 +16,7 @@ namespace RequestServer {
class HttpsRequest final : public Request {
public:
virtual ~HttpsRequest() override;
static NonnullOwnPtr<HttpsRequest> create_with_job(Badge<HttpsProtocol>&&, ConnectionFromClient&, NonnullRefPtr<HTTP::HttpsJob>, NonnullOwnPtr<Core::File>&&);
static NonnullOwnPtr<HttpsRequest> create_with_job(Badge<HttpsProtocol>&&, ConnectionFromClient&, NonnullRefPtr<HTTP::HttpsJob>, NonnullOwnPtr<Core::File>&&, i32);
HTTP::HttpsJob& job() { return m_job; }
HTTP::HttpsJob const& job() const { return m_job; }
@ -24,7 +24,7 @@ public:
virtual URL url() const override { return m_job->url(); }
private:
explicit HttpsRequest(ConnectionFromClient&, NonnullRefPtr<HTTP::HttpsJob>, NonnullOwnPtr<Core::File>&&);
explicit HttpsRequest(ConnectionFromClient&, NonnullRefPtr<HTTP::HttpsJob>, NonnullOwnPtr<Core::File>&&, i32);
virtual void set_certificate(ByteString certificate, ByteString key) override;