mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +00:00
This patch adds ProtocolServer, a server that handles network requests on behalf of its clients. The first protocol implemented is HTTP. The idea here is to use a plug-in architecture where any number of protocols can be added and implemented without having to mess around with each client program that wants to use the protocol. A simple client API is provided through LibProtocol::Client. :^)
19 lines
451 B
C++
19 lines
451 B
C++
#pragma once
|
|
|
|
#include <AK/Badge.h>
|
|
#include <ProtocolServer/Download.h>
|
|
|
|
class CHttpJob;
|
|
class HttpProtocol;
|
|
|
|
class HttpDownload final : public Download {
|
|
public:
|
|
virtual ~HttpDownload() override;
|
|
static NonnullRefPtr<HttpDownload> create_with_job(Badge<HttpProtocol>, PSClientConnection&, NonnullRefPtr<CHttpJob>&&);
|
|
|
|
private:
|
|
explicit HttpDownload(PSClientConnection&, NonnullRefPtr<CHttpJob>&&);
|
|
|
|
NonnullRefPtr<CHttpJob> m_job;
|
|
};
|