QML WebSocket Server

简单范例,展示如何使用 QML WebSocketServer .

QML WebSocket Server GUI

This example opens a window and has a WebSocketServer listening for incoming connections and a WebSocket connecting to the WebSocketServer . Every time the window is clicked, the WebSocket sends a message to the WebSocketServer WebSocketServer has a signal handler that logs the incoming message to the window and sends a message back again, and the WebSocket has a signal handler that logs the returned message to the window.

范例工程 @ code.qt.io