|
AvogadroApp
|
#include <avogadro/rpc/jsonrpcclient.h>
Public Slots | |
| bool | connectToServer (const QString &serverName) |
| void | flush () |
| QJsonObject | emptyRequest () |
| bool | sendRequest (const QJsonObject &request) |
Public Member Functions | |
| JsonRpcClient (QObject *parent_=nullptr) | |
| bool | isConnected () const |
| QString | serverName () const |
Protected Slots | |
| void | readPacket (const QByteArray message) |
| void | readSocket () |
Protected Attributes | |
| unsigned int | m_packetCounter |
| QLocalSocket * | m_socket |
The JsonRpcClient class is used by clients to submit calls to an RPC server using JSON-RPC 2.0.
Provides a simple Qt C++ API to make JSON-RPC 2.0 calls to an RPC server.
| bool isConnected | ( | ) | const |
Query if the client is connected to a server.
| QString serverName | ( | ) | const |
|
slot |
Connect to the server.
|
slot |
Flush all pending messages to the server.
|
slot |
Construct an empty JSON-RPC 2.0 request with a valid request id.
|
slot |
Send the Json request to the RPC server.