diff options
| author | Per Larsson <[email protected]> | 2022-02-09 20:51:59 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-02-09 20:51:59 +0100 |
| commit | 8692e7882ed9b7e8d3fb298ba51b7779d58a73b9 (patch) | |
| tree | 7738ea0431ea46b98ac30eb0ab2702968f61b25d /zenserver/zenserver.cpp | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-8692e7882ed9b7e8d3fb298ba51b7779d58a73b9.tar.xz zen-8692e7882ed9b7e8d3fb298ba51b7779d58a73b9.zip | |
Initial websocket support.
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index ea0f52db2..c9fca2f55 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -15,6 +15,7 @@ #include <zencore/timer.h> #include <zencore/trace.h> #include <zenhttp/httpserver.h> +#include <zenhttp/websocketserver.h> #include <zenstore/basicfile.h> #include <zenstore/cas.h> #include <zenstore/cidstore.h> @@ -204,6 +205,8 @@ public: m_Http = zen::CreateHttpServer(ServerOptions.HttpServerClass); int EffectiveBasePort = m_Http->Initialize(ServerOptions.BasePort); + m_WebSocket = zen::WebSocketServer::Create(); + // Setup authentication manager { std::string EncryptionKey = ServerOptions.EncryptionKey; @@ -395,7 +398,9 @@ public: SetNewState(kRunning); OnReady(); - + + m_WebSocket->Run({.Port = 8848}); + m_Http->Run(IsInteractiveMode); SetNewState(kShuttingDown); @@ -559,6 +564,7 @@ private: } zen::Ref<zen::HttpServer> m_Http; + std::unique_ptr<zen::WebSocketServer> m_WebSocket; std::unique_ptr<zen::AuthMgr> m_AuthMgr; std::unique_ptr<zen::HttpAuthService> m_AuthService; zen::HttpStatusService m_StatusService; |