diff options
| author | Per Larsson <[email protected]> | 2022-02-21 15:00:02 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-02-21 15:00:02 +0100 |
| commit | 41782efc63d7f88525596d6724a1bb86d6fdcfa4 (patch) | |
| tree | 80567b8cc256c361abb8f81b53680f2fa6ec6fcc /zenhttp/include | |
| parent | Refactored websocket message. (diff) | |
| download | zen-41782efc63d7f88525596d6724a1bb86d6fdcfa4.tar.xz zen-41782efc63d7f88525596d6724a1bb86d6fdcfa4.zip | |
Added option to enable websockets.
Diffstat (limited to 'zenhttp/include')
| -rw-r--r-- | zenhttp/include/zenhttp/websocket.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zenhttp/include/zenhttp/websocket.h b/zenhttp/include/zenhttp/websocket.h index 336d98b42..a514e6002 100644 --- a/zenhttp/include/zenhttp/websocket.h +++ b/zenhttp/include/zenhttp/websocket.h @@ -139,7 +139,7 @@ private: */ struct WebSocketServerOptions { - uint16_t Port = 8848; + uint16_t Port = 2337; uint32_t ThreadCount = 1; }; @@ -151,8 +151,8 @@ class WebSocketServer public: virtual ~WebSocketServer() = default; - virtual bool Run(const WebSocketServerOptions& Options) = 0; - virtual void Shutdown() = 0; + virtual bool Run() = 0; + virtual void Shutdown() = 0; virtual void RegisterService(WebSocketService& Service) = 0; virtual void RegisterNotificationHandler(std::string_view Key, WebSocketService& Service) = 0; @@ -161,7 +161,7 @@ public: virtual void SendNotification(WebSocketMessage&& Notification) = 0; virtual void SendResponse(WebSocketMessage&& Response) = 0; - static std::unique_ptr<WebSocketServer> Create(); + static std::unique_ptr<WebSocketServer> Create(const WebSocketServerOptions& Options); }; /** |