mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 20:13:05 +02:00
In HTTPCore (httpcli.hpp), factor out code into httpcommon.hpp that is common to both HTTP clients and servers, so upcoming HTTP server implementation can leverage on the same code currently used by the client.
This commit is contained in:
parent
06fa9d2f21
commit
7194db16c2
@ -29,18 +29,14 @@ namespace openvpn {
|
||||
};
|
||||
|
||||
public:
|
||||
struct Callback
|
||||
{
|
||||
virtual void chunked_content_in(BufferAllocated& buf) = 0;
|
||||
};
|
||||
|
||||
ChunkedHelper()
|
||||
: state(hex),
|
||||
size(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool receive(Callback& callback, BufferAllocated& buf)
|
||||
template <typename PARENT>
|
||||
bool receive(PARENT& callback, BufferAllocated& buf)
|
||||
{
|
||||
while (buf.defined())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user