fetch_messages Method
Receive currently buffered messages and return to sleep.
Syntax
def fetch_messages() -> None: ...
Remarks
Request any messages currently being buffered by the server for the current sleep period and return to sleep after they have been received.
Any available buffered messages will be sent to the client by the MQTTSN Gateway and the sleep interval will be reset.
This method sends a PINGREQ method with the client_id, requesting buffered messages which will be sent if available (see on_message_in). When the server has sent all messages, it will sent a PINGRESP message, causing the client to re-enter sleep mode. Once the PINGRESP is received, the duration the client may sleep restarts.