forked from awwit/httpserverapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerHttp2.h
More file actions
41 lines (33 loc) · 837 Bytes
/
ServerHttp2.h
File metadata and controls
41 lines (33 loc) · 837 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
#pragma once
#include "ServerProtocol.h"
#include "../../transfer/http2/Http2.h"
namespace HttpServer
{
class ServerHttp2 : public ServerProtocol
{
protected:
Http2::OutStream *stream;
public:
ServerHttp2(
Socket::Adapter *sock,
Http2::OutStream *stream
) noexcept;
virtual ~ServerHttp2() noexcept override;
void sendWindowUpdate(
const uint32_t size,
const std::chrono::milliseconds &timeout
) const;
virtual bool sendHeaders(
const Http::StatusCode status,
std::vector<std::pair<std::string, std::string> > &headers,
const std::chrono::milliseconds &timeout,
const bool endStream = true
) const override;
virtual long sendData(
const void *src,
const size_t size,
const std::chrono::milliseconds &timeout,
const bool endStream = true
) const noexcept override;
};
}