0
0
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:
James Yonan 2015-04-09 00:25:41 -06:00 committed by Lev Stipakov
parent 06fa9d2f21
commit 7194db16c2
No known key found for this signature in database
GPG Key ID: 88670BE258B9C258

View File

@ -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())
{