-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHttpStream
More file actions
47 lines (36 loc) · 918 Bytes
/
HttpStream
File metadata and controls
47 lines (36 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Copyright (C) 2021 Frank Mertens.
*
* Distribution and use is allowed under the terms of the GNU General Public License version 3
* (see CoreComponents/LICENSE-gpl-3.0).
*
*/
#pragma once
#include <cc/HttpError>
#include <cc/Stream>
namespace cc {
/** \class HttpCloseRequest cc/HttpStream
* \ingroup http_protocol
* \brief A request to close the HTTP pipeline has been received
*/
class HttpCloseRequest{};
/** \class HttpStream cc/HttpStream
* \ingroup http_protocol
* \brief HTTP message stream (pipelining and chunked I/O)
*/
class HttpStream final: public Stream
{
public:
HttpStream() = default;
explicit HttpStream(const Stream &stream);
bool isPayloadConsumed() const;
void nextHeader();
void nextPayload(long length);
void nextLine();
void nextChunk();
private:
struct State;
State &me();
const State &me() const;
};
} // namespace cc