|
AvogadroApp
|
#include <avogadro/rpc/jsonrpc.h>
Signals | |
| void | messageReceived (const Avogadro::RPC::Message &message) |
Public Member Functions | |
| JsonRpc (QObject *parent_=nullptr) | |
| void | addConnectionListener (ConnectionListener *connlist) |
| void | removeConnectionListener (ConnectionListener *connlist) |
The JsonRpc class manages ConnectionListener and Connection instances, and emits incoming JSON-RPC Messages.
To use the JsonRpc class, create one or more ConnectionListener instances and call addConnectionListener(). Connect a slot to messageReceived and handle any incoming messages.
Incoming requests with method="internalPing" will be automatically replied to with result="pong". This can be used to test if a server is alive.
| void addConnectionListener | ( | ConnectionListener * | connlist | ) |
Register a connection listener with this JsonRpc instance. Any incoming connections on the listener will be monitored by this class.
| void removeConnectionListener | ( | ConnectionListener * | connlist | ) |
Unregister a connection listener from this JsonRpc instance.
|
signal |
Emitted when a valid message is received.