aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpasio.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/httpasio.h')
-rw-r--r--src/zenhttp/httpasio.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/zenhttp/httpasio.h b/src/zenhttp/httpasio.h
new file mode 100644
index 000000000..716145955
--- /dev/null
+++ b/src/zenhttp/httpasio.h
@@ -0,0 +1,36 @@
+// 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();
+ ~HttpAsioServer();
+
+ virtual void RegisterService(HttpService& Service) override;
+ virtual int Initialize(int BasePort) override;
+ virtual void Run(bool IsInteractiveSession) override;
+ virtual void RequestExit() override;
+
+private:
+ Event m_ShutdownEvent;
+ int m_BasePort = 0;
+
+ std::unique_ptr<asio_http::HttpAsioServerImpl> m_Impl;
+};
+
+} // namespace zen