aboutsummaryrefslogtreecommitdiff
path: root/src/demoserver.h
diff options
context:
space:
mode:
authorLeifa <26681464+TrickyLeifa@users.noreply.github.com>2024-07-09 13:07:30 +0200
committerGitHub <noreply@github.com>2024-07-09 13:07:30 +0200
commitefd2571459924f40718130f7edd28a72a76b12d7 (patch)
tree91751194abb0bfe1306976d676740b43a53dd81b /src/demoserver.h
parent662d4781d2653e02b9f3727a9299ded8c7b1eaa2 (diff)
Remove TCP entry point (#1007)
* Remove TCP entry point Resolve #987 * Remove TCP entry point * Servers that do not support WebSocket will be marked as `Legacy` * Removal of TCP connection from the master will follow later. * Tweaked error message
Diffstat (limited to 'src/demoserver.h')
-rw-r--r--src/demoserver.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/demoserver.h b/src/demoserver.h
index f52fbc7e..025ffe38 100644
--- a/src/demoserver.h
+++ b/src/demoserver.h
@@ -7,9 +7,9 @@
#include <QMessageBox>
#include <QObject>
#include <QQueue>
-#include <QTcpServer>
-#include <QTcpSocket>
#include <QTimer>
+#include <QWebSocket>
+#include <QWebSocketServer>
class DemoServer : public QObject
{
@@ -27,8 +27,8 @@ private:
int m_port = 0;
int m_max_wait = -1;
- QTcpServer *tcp_server;
- QTcpSocket *client_sock = nullptr;
+ QWebSocketServer *server;
+ QWebSocket *client_sock = nullptr;
bool client_connected = false;
bool partial_packet = false;
bool debug_mode = false;
@@ -48,7 +48,7 @@ private:
private Q_SLOTS:
void accept_connection();
void destroy_connection();
- void recv_data();
+ void recv_data(const QString &in_data);
void client_disconnect();
void playback();