RemoteObjects: signal when node or replica disconnects from host
-
Hello,
I'm searching for an API of QtRemoteObject to detect when a remote client node (or even a specific replica if possible) disconnects from the registry/host.
I've seen that this question has no answers on stackoverflow.
I know the networking model of QtRO is kind of peer-to-peer, so it's hard to detected new connections or lost connections of remote node, but such feature would really help on our project.
I've searched here in particular:
https://doc.qt.io/qt-5/qremoteobjectregistry.html
https://doc.qt.io/qt-5/qremoteobjectnode.html
https://doc.qt.io/qt-5/qremoteobjecthost.htmlwhen I close the client qt application, i don't seen any related log on the host side:

thanks for your support,
regards,
enrico -
Hello,
I'm searching for an API of QtRemoteObject to detect when a remote client node (or even a specific replica if possible) disconnects from the registry/host.
I've seen that this question has no answers on stackoverflow.
I know the networking model of QtRO is kind of peer-to-peer, so it's hard to detected new connections or lost connections of remote node, but such feature would really help on our project.
I've searched here in particular:
https://doc.qt.io/qt-5/qremoteobjectregistry.html
https://doc.qt.io/qt-5/qremoteobjectnode.html
https://doc.qt.io/qt-5/qremoteobjecthost.htmlwhen I close the client qt application, i don't seen any related log on the host side:

thanks for your support,
regards,
enrico@enricopapi said in RemoteObjects: signal when node or replica disconnects from host:
I've seen that this question has no answers on stackoverflow.
Indeed. But do read the comments.
My 2 cents, I have not used QtRO but if
stateChanged/remoteObjectRemoved()signals are not being received/isReplicaValid()doesn't help, and the log shows no sign of the disconnection, does this not suggest lost connections are not detected? Like with sockets. As one of the comments suggests, you may have to implement heartbeat as the only way to notice something is no longer there? Only a guess based on reading. -
Hello, thanks for your reply.
What we are searching for is a Signal or an API on the Host side, to know a replica has been destroyed or the client application just exited.
Since the host has all the sources that push data to replicas, it would be usefull to know if a remote replica has been attached/detached from an host source.
Sorry my question was not very clear.
-
Hello, thanks for your reply.
What we are searching for is a Signal or an API on the Host side, to know a replica has been destroyed or the client application just exited.
Since the host has all the sources that push data to replicas, it would be usefull to know if a remote replica has been attached/detached from an host source.
Sorry my question was not very clear.
@enricopapi said in RemoteObjects: signal when node or replica disconnects from host:
it would be usefull to know if a remote replica has been attached/detached from an host source
What evidence do you have that upon "or the client application just exited" then the host gets any notification at all?
My reading of the SO posts etc. is that if the functions I mentioned do not help you would have to write your own "heartbeat" mechanism to detect a client "gone away". If that SO thread is exactly your question and you can see it got no answer other than the comments maybe that is indicative?
-
@enricopapi said in RemoteObjects: signal when node or replica disconnects from host:
it would be usefull to know if a remote replica has been attached/detached from an host source
What evidence do you have that upon "or the client application just exited" then the host gets any notification at all?
My reading of the SO posts etc. is that if the functions I mentioned do not help you would have to write your own "heartbeat" mechanism to detect a client "gone away". If that SO thread is exactly your question and you can see it got no answer other than the comments maybe that is indicative?
@JonB Yes, it is indicative it has no answers. We will try to implement our "heartbeat" or a similar mechanism. thank you