Server Echo WebSocket

Mostra come scrivere una semplice applicazione server WebSocket.

Questo server Echo mostra come creare una semplice applicazione server che invia una risposta in seguito alla ricezione di un messaggio, utilizzando l'API WebSocket. A scopo illustrativo, la risposta è semplicemente una copia del messaggio.

Se il tuo browser web supporta WebSocket, puoi anche utilizzarlo per aprire il file echoserver/echoclient.html{echoclient.html} e procedere come mostrato nella schermata seguente:

Client HTML per WebSocket Echo

Altrimenti, usa il client WebSocket Echo per collegarti al server.

Progetto di esempio su code.qt.io

Vedi anche WebSocket Echo Client.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.