aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/include
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-02-21 15:00:02 +0100
committerPer Larsson <[email protected]>2022-02-21 15:00:02 +0100
commit41782efc63d7f88525596d6724a1bb86d6fdcfa4 (patch)
tree80567b8cc256c361abb8f81b53680f2fa6ec6fcc /zenhttp/include
parentRefactored websocket message. (diff)
downloadzen-41782efc63d7f88525596d6724a1bb86d6fdcfa4.tar.xz
zen-41782efc63d7f88525596d6724a1bb86d6fdcfa4.zip
Added option to enable websockets.
Diffstat (limited to 'zenhttp/include')
-rw-r--r--zenhttp/include/zenhttp/websocket.h8
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);
};
/**