
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. :^)
11 lines
254 B
C++
11 lines
254 B
C++
#pragma once
|
|
|
|
#include <ProtocolServer/Protocol.h>
|
|
|
|
class HttpProtocol final : public Protocol {
|
|
public:
|
|
HttpProtocol();
|
|
virtual ~HttpProtocol() override;
|
|
|
|
virtual RefPtr<Download> start_download(PSClientConnection&, const URL&) override;
|
|
};
|