diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-11 15:25:11 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-11 15:25:11 +0100 |
| commit | 094b8aa2bbb8b90dff9da199873cbc6b36549eb6 (patch) | |
| tree | f7dea55e25ca4f9a0461c88a9c91953bb77336fc /mock-server/EchoServer.h | |
| parent | 920a1adeadef58eb04f2bf83af8fb8bc6c01a986 (diff) | |
| download | QtXpl2-094b8aa2bbb8b90dff9da199873cbc6b36549eb6.tar.gz QtXpl2-094b8aa2bbb8b90dff9da199873cbc6b36549eb6.zip | |
Refactor: three XPL2 ports, EchoServer class, dark debug console, qmllint clean
- Xpl2Client: replace single port with commandPort/imagingPort/statusPort (9110/9111/9112)
- Mock server: extract EchoServer class from lambda-based listenOn()
- Demo: dark debug console matching BobinkQtOpcUa style, 2-column connection layout
- Fix qmlls module resolution via IMPORT_PATH in qt_add_qml_module()
- Add pragma ComponentBehavior: Bound, fix all qmllint warnings
Diffstat (limited to 'mock-server/EchoServer.h')
| -rw-r--r-- | mock-server/EchoServer.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mock-server/EchoServer.h b/mock-server/EchoServer.h new file mode 100644 index 0000000..2e51b1e --- /dev/null +++ b/mock-server/EchoServer.h @@ -0,0 +1,24 @@ +/** + * @file EchoServer.h + * @brief Simple TCP echo server for a single port. + */ +#pragma once + +#include <QTcpServer> + +class EchoServer : public QTcpServer +{ + Q_OBJECT + +public: + EchoServer (quint16 port, const char *name, QObject *parent = nullptr); + +private slots: + void onNewConnection (); + void onClientReadyRead (); + void onClientDisconnected (); + +private: + const char *m_name; + quint16 m_port; +}; |
