Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support packet retransmission in QOS 1 / 2 mode #143

Open
NicoWallmeier opened this issue May 25, 2018 · 3 comments
Open

Support packet retransmission in QOS 1 / 2 mode #143

NicoWallmeier opened this issue May 25, 2018 · 3 comments

Comments

@NicoWallmeier
Copy link
Contributor

I have reviewed the qmqtt implementation and I’m wondering how QOS 1 respectively QOS 2 works if the underlying socket is not connected while the publish method is executed?

In that case the method QMQTT::Network::sendFrame would do nothing because the socket is not connected, but the method QMQTT::ClientPrivate::publish would put the message to the hash _midToMessage. I could not find that a retransmission is performed after the socket is connected again… Do I missed something?

@ejvr
Copy link
Contributor

ejvr commented May 27, 2018 via email

@mwallnoefer mwallnoefer changed the title Question regarding QOS 1 / 2 Support packet retransmission in QOS 1 / 2 mode May 30, 2018
@momor10
Copy link

momor10 commented Aug 30, 2018

I'm not sure if it's the same problem. but sometimes a publish doesn't lead to a published nor to an error event (maybe due to a bad connection?)
Is there an timeout event or something similar for the publish method?
edit: any other publish attempts will not work either. so the only option is to disconnect and connect again. any suggestion on what to do?
There is a signal for receiving the ping response. Is there a slot to send a pingrequest?

@ejvr
Copy link
Contributor

ejvr commented Aug 31, 2018

A call to Client::publish will cause a PUBLISH message to be sent over the TCP connection, unless the TCP connection is down at that moment (that is, we are between disconnect and reconnect), and there is no retry. I guess this is incorrect if QOS1/2 is used, but that's how it is.

About the pingrequest: right now, pinging is fully automatic, there is no manual option. It is easy to implement however, the code you'll need is in ClientPrivate::onTimerPingReq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants