WebSocket QML Type
QML interface to QWebSocket. More...
Import Statement: | import QtWebSockets 1.1 |
Since: | Qt 5.3 |
Properties
- active : bool
- errorString : QString
- status : Status
- url : QUrl
Signals
- binaryMessageReceived(QString message)
- statusChanged(Status status)
- textMessageReceived(QString message)
Methods
- void sendBinaryMessage(ArrayBuffer message)
- void sendTextMessage(string message)
Detailed Description
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.
Property Documentation
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.
Signal Documentation
This signal is emitted when a binary message is received.
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.
See also WebSocket::status.
Method Documentation
Sends message
to the server.
This method was introduced in Qt 5.8.
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.