WebSocket QML Type
QML interface to QWebSocket. 更多...
Import Statement: | import QtWebSockets 1.1 |
开始支持版本: | Qt 5.3 |
属性
- active : bool
- errorString : QString
- status : Status
- url : QUrl
信号
- binaryMessageReceived(QString message)
- statusChanged(Status status)
- textMessageReceived(QString message)
方法
- void sendBinaryMessage(ArrayBuffer message)
- void sendTextMessage(string message)
详细描述
WebSockets is a web technology providing full-duplex communications channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as 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:
- WebSocket.Connecting
- WebSocket.Open
- WebSocket.Closing
- WebSocket.Closed
- WebSocket.Error
Server url to connect to. The url must have one of 2 schemes: ws:// or wss://. When not supplied, then ws:// is used.
信号
This signal is emitted when a binary message is received.
This QML 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.
成员
Sends message
to the server.
This QML method was introduced in Qt 5.8.