blob: 81aadfc2371b30595018c271baccc5a446ec42b6 (
plain) (
blame)
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
|
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include <zencore/thread.h>
#include <zenhttp/httpserver.h>
#include <memory>
namespace zen {
namespace asio_http {
struct HttpServerConnection;
struct HttpAcceptor;
struct HttpAsioServerImpl;
} // namespace asio_http
class HttpAsioServer : public HttpServer
{
public:
HttpAsioServer(unsigned int ThreadCount);
~HttpAsioServer();
virtual void RegisterService(HttpService& Service) override;
virtual int Initialize(int BasePort) override;
virtual void Run(bool IsInteractiveSession) override;
virtual void RequestExit() override;
virtual void Close() override;
private:
Event m_ShutdownEvent;
int m_BasePort = 0;
unsigned int m_ThreadCount = 0;
std::unique_ptr<asio_http::HttpAsioServerImpl> m_Impl;
};
} // namespace zen
|