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
23 lines (17 loc) · 756 Bytes
/
ServerHttp2.h
File metadata and controls
23 lines (17 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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);
virtual ~ServerHttp2() noexcept;
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 override;
};
}