aboutsummaryrefslogtreecommitdiff
path: root/zenserver/testing/httptest.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-02-18 14:48:41 +0100
committerPer Larsson <[email protected]>2022-02-18 14:48:41 +0100
commit08cc02bf1b5cad75ed7b97c0dc7cfc082da537c4 (patch)
tree8fd8e7189c9807280003eabb3040cb35db2e5cd4 /zenserver/testing/httptest.h
parentWeb socket client is shared between I/O thead and client. (diff)
downloadzen-08cc02bf1b5cad75ed7b97c0dc7cfc082da537c4.tar.xz
zen-08cc02bf1b5cad75ed7b97c0dc7cfc082da537c4.zip
Basic websocket service and test.
Diffstat (limited to 'zenserver/testing/httptest.h')
-rw-r--r--zenserver/testing/httptest.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/zenserver/testing/httptest.h b/zenserver/testing/httptest.h
index f7ea0c31c..267d59b36 100644
--- a/zenserver/testing/httptest.h
+++ b/zenserver/testing/httptest.h
@@ -5,6 +5,7 @@
#include <zencore/logging.h>
#include <zencore/stats.h>
#include <zenhttp/httpserver.h>
+#include <zenhttp/websocket.h>
#include <atomic>
@@ -13,7 +14,7 @@ namespace zen {
/**
* Test service to facilitate testing the HTTP framework and client interactions
*/
-class HttpTestingService : public HttpService
+class HttpTestingService : public HttpService, public WebSocketService
{
public:
HttpTestingService();
@@ -22,6 +23,7 @@ public:
virtual const char* BaseUri() const override;
virtual void HandleRequest(HttpServerRequest& Request) override;
virtual Ref<IHttpPackageHandler> HandlePackageRequest(HttpServerRequest& HttpServiceRequest) override;
+ virtual bool HandleMessage(WebSocketId SocketId, const CbPackage& Msg) override;
class PackageHandler : public IHttpPackageHandler
{