aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/include
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-02-09 20:51:59 +0100
committerPer Larsson <[email protected]>2022-02-09 20:51:59 +0100
commit8692e7882ed9b7e8d3fb298ba51b7779d58a73b9 (patch)
tree7738ea0431ea46b98ac30eb0ab2702968f61b25d /zenhttp/include
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-8692e7882ed9b7e8d3fb298ba51b7779d58a73b9.tar.xz
zen-8692e7882ed9b7e8d3fb298ba51b7779d58a73b9.zip
Initial websocket support.
Diffstat (limited to 'zenhttp/include')
-rw-r--r--zenhttp/include/zenhttp/websocketserver.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/zenhttp/include/zenhttp/websocketserver.h b/zenhttp/include/zenhttp/websocketserver.h
new file mode 100644
index 000000000..309119d2a
--- /dev/null
+++ b/zenhttp/include/zenhttp/websocketserver.h
@@ -0,0 +1,24 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#include <memory>
+
+namespace zen {
+
+struct WebSocketServerOptions
+{
+ uint16_t Port = 8848;
+ uint32_t ThreadCount = 1;
+};
+
+class WebSocketServer
+{
+public:
+ virtual ~WebSocketServer() = default;
+
+ virtual bool Run(const WebSocketServerOptions& Options) = 0;
+ virtual void Shutdown() = 0;
+
+ static std::unique_ptr<WebSocketServer> Create();
+};
+
+} // namespace zen