forked from awwit/httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.h
More file actions
42 lines (32 loc) · 738 Bytes
/
Request.h
File metadata and controls
42 lines (32 loc) · 738 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
#pragma once
#include "../transfer/AppRequest.h"
#include "../transfer/ProtocolVariant.h"
#include <unordered_map>
#include <chrono>
namespace HttpServer
{
enum ConnectionParams {
CONNECTION_CLOSE = 0,
CONNECTION_REUSE = 1,
CONNECTION_LEAVE_OPEN = 2
};
struct Request : public Transfer::request_data
{
std::unordered_map<std::string, std::string> outgoing_headers;
std::string host;
std::string path;
std::string method;
std::chrono::milliseconds timeout;
size_t keep_alive_count;
int connection_params;
int app_exit_code;
Transfer::ProtocolVariant protocol_variant;
// void *protocol_data;
public:
void clear() noexcept;
};
struct DataTransfer {
size_t full_size;
size_t send_total;
};
}