2 title: Qt AFB Websocket client
5 ## QAfbWebsocketClient(QObject* parent = nullptr)
9 * `parent`: Parent object.
11 ## QAbstractSocket::SocketError error()
13 Get and return the last error code.
15 ## QString errorString()
17 Get and return the last error as a string.
21 Check if connection is ready or not.
23 Returns `true` if the connected is ready to read and write, `false` otherwise.
25 ## void call(const QString& api, const QString& verb, const QJsonValue& arg = QJsonValue(), closure_t closure = nullptr)
27 Call an api's verb with an argument.
30 * `verb`: Verb to call.
31 * `arg`: Argument to pass.
32 * `closure`: callback function to call at the verb reply
34 ## void QAfbWebsocketClient::sendTextMessage(QString msg)
36 Send a text message over the websocket.
38 This is use for test only, you should not use this method because it sent text
39 **as-is**, so you have to follow the binder's protocol by your self.
41 * `msg`: Message to send.