WebSocket 回显服务器

展示如何编写简单 WebSocket 服务器应用程序。

This Echo Server shows how to create a simple server application that sends back a reply in response to a message it receives, using the WebSocket API. For the sake of illustration, the reply is simply a copy of the message.

若 Web 浏览器支持 WebSocket ,还能用它打开 echoserver/echoclient.html {echoclient.html} file, and operate as shown in the following screenshot:

WebSocket Echo HTML Client

否则,使用 WebSocket 回显客户端 连接到服务器。

范例工程 @ code.qt.io

另请参阅 WebSocket 回显客户端 .