From 61debe99a269bf7e87f6ba2f8d2a376e619fcf12 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Mon, 23 Mar 2026 16:39:33 +0100 Subject: Invert TCP connection model: client listens, server connects The XPL2 protocol specifies that the JI2 controller initiates connections to the client, not the other way around. Xpl2Client now listens on 3 ports via QTcpServer and accepts inbound connections; MockServer connects out with auto-retry on the 1s KA_PING tick. QML API: startListening/stopListening, listening+connected properties, host property removed. Mock server gains --host CLI arg. --- mock-server/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mock-server/main.cpp') diff --git a/mock-server/main.cpp b/mock-server/main.cpp index 5613462..9a55463 100644 --- a/mock-server/main.cpp +++ b/mock-server/main.cpp @@ -16,13 +16,15 @@ main (int argc, char *argv[]) QCommandLineParser parser; parser.addOption ({ "wire-debug", "Log raw wire TX/RX to dev log" }); + parser.addOption ({ "host", "Target host to connect to (default 127.0.0.1)", + "address", "127.0.0.1" }); parser.addHelpOption (); parser.process (app); if (parser.isSet ("wire-debug")) MockServer::enableWireDebug (); - new MockServer (&app); + new MockServer (parser.value ("host"), &app); return app.exec (); } -- cgit v1.2.3