aboutsummaryrefslogtreecommitdiffstats
path: root/mock-server/main.cpp
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-03-13 11:58:45 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-03-13 11:58:45 +0100
commit02fe86ab2a04a02b114d7ca8ce4374a29a1d5f45 (patch)
treeebec2643d7238d0447a236a278757c718b0ef0ac /mock-server/main.cpp
parenta2b1ccf17845e55caef7f69a5e68f49a55b6a166 (diff)
downloadQtXpl2-02fe86ab2a04a02b114d7ca8ce4374a29a1d5f45.tar.gz
QtXpl2-02fe86ab2a04a02b114d7ca8ce4374a29a1d5f45.zip
Coalesce mock server into single MockServer class
Replace three independent EchoServer instances with one MockServer that owns three QTcpServers, shares a single KA_PING timer, and uses a flat client list with localPort() for port resolution.
Diffstat (limited to 'mock-server/main.cpp')
-rw-r--r--mock-server/main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/mock-server/main.cpp b/mock-server/main.cpp
index 0694e4d..b104685 100644
--- a/mock-server/main.cpp
+++ b/mock-server/main.cpp
@@ -1,8 +1,8 @@
/**
* @file main.cpp
- * @brief Mock XPL2 server — echoes back on three ports.
+ * @brief Mock XPL2 server on three protocol ports.
*/
-#include "EchoServer.h"
+#include "MockServer.h"
#include <QCoreApplication>
@@ -11,9 +11,7 @@ main (int argc, char *argv[])
{
QCoreApplication app (argc, argv);
- new EchoServer (9110, "Command", &app);
- new EchoServer (9111, "Imaging", &app);
- new EchoServer (9112, "Status", &app);
+ new MockServer (&app);
return app.exec ();
}