diff options
author | BogDan Vatra <bogdan@kdab.com> | 2017-11-17 16:28:28 +0200 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2017-12-08 17:28:03 +0000 |
commit | 9ae28ac68af20b4d8b305fa78a478833cc833642 (patch) | |
tree | 2e633b38453597e7b7bff60dafd61a3f54b31304 /src/remoteobjects/qremoteobjectreplica_p.h | |
parent | f101d41c8f7d2068e168f3bc967cde74aeae7f4c (diff) |
Say hello to QRemoteObjectNode::heartbeatInterval property
This property can be used to periodically check the connection between
the replica and the source. If the connection is lost, the replica
enters in the "Suspect" state and will attempt to reconnect.
Task-number: QTBUG-64086
Change-Id: Icf67e173073c9d277575c8faf01a0a1ffab5bc07
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectreplica_p.h')
-rw-r--r-- | src/remoteobjects/qremoteobjectreplica_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/remoteobjects/qremoteobjectreplica_p.h b/src/remoteobjects/qremoteobjectreplica_p.h index 465f111..61ad51f 100644 --- a/src/remoteobjects/qremoteobjectreplica_p.h +++ b/src/remoteobjects/qremoteobjectreplica_p.h @@ -61,6 +61,7 @@ #include <QVector> #include <QDataStream> #include <qcompilerdetection.h> +#include <QTimer> QT_BEGIN_NAMESPACE @@ -181,9 +182,10 @@ public: QPointer<ClientIoDevice> connectionToSource; // pending call data - int m_curSerialId; + int m_curSerialId = 1; // 0 is reserved for heartbeat signals QHash<int, QRemoteObjectPendingCall> m_pendingCalls; QRemoteObjectPackets::DataStreamPacket m_packet; + QTimer m_heartbeatTimer; }; class QInProcessReplicaImplementation : public QRemoteObjectReplicaImplementation |