QML 接口到 QWebSocket . 更多...
import 语句: | import QtWebSockets 1.15 |
Since: | Qt 5.3 |
WebSocket 是通过单 TCP 连接提供全双工通信通道的 Web 技术。WebSocket 协议由 IETF 标准化为 RFC 6455 in 2011.
When set to true, a connection is made to the server with the given url. When set to false, the connection is closed. The default value is false.
Contains a description of the last error that occurred. When no error occurrred, this string is empty.
Status of the WebSocket.
The status can have the following values:
Server url to connect to. The url must have one of 2 schemes: ws:// or wss:// . When not supplied, then ws:// 被使用。
This signal is emitted when a binary message is received. message contains the bytes received.
注意:
相应处理程序是
onBinaryMessageReceived
.
This signal was introduced in Qt 5.8.
This signal is emitted when the status of the WebSocket changes. The status argument provides the current status.
注意:
相应处理程序是
onStatusChanged
.
另请参阅 WebSocket::status .
This signal is emitted when a text message is received. message contains the bytes received.
注意:
相应处理程序是
onTextMessageReceived
.
Sends the parameter message to the server.
This method was introduced in Qt 5.8.
发送 message to the server.