From 71b5fc5dd10e9edce8db886f6c05b7950b3cca6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 25 Sep 2017 16:16:58 +0200 Subject: Revamp WebSocket's simple-chat example - Replace Q_* macros with their 'modern' substitutes - Replace a usage of qDebug with QTextStream - Print a little piece of text whenever a client connects - Add a textbox to the html page to set the host to connect to - Enable/disable disconnect and send button based on connection Task-number: QTBUG-60656 Change-Id: Ieec571c3964f94cd464912054acda3208c02c898 Reviewed-by: Liang Qi Reviewed-by: Timur Pocheptsov --- examples/websockets/simplechat/chatclient.html | 15 +++++++--- examples/websockets/simplechat/chatserver.cpp | 40 ++++++++++++++++---------- examples/websockets/simplechat/chatserver.h | 8 +++--- examples/websockets/simplechat/main.cpp | 1 + 4 files changed, 41 insertions(+), 23 deletions(-) diff --git a/examples/websockets/simplechat/chatclient.html b/examples/websockets/simplechat/chatclient.html index 511d05b..d2dbf47 100644 --- a/examples/websockets/simplechat/chatclient.html +++ b/examples/websockets/simplechat/chatclient.html @@ -4,18 +4,21 @@

WebSocket Chat Client

+

+ Host: +

- +

- +

- +