WebSocket Echo Server

Show how to write a simple WebSocket server application.

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

Otherwise use the WebSocket Echo Client to connect to the server.

范例工程 @ code.qt.io

另请参阅 WebSocket Echo Client .