fetchMessages (method)

Receive currently buffered messages and return to sleep.

Syntax

- (void)fetchMessages;
public func fetchMessages() throws -> Void

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 ClientId, requesting buffered messages which will be sent if available (see MessageIn). 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.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 iOS Edition - Version 20.0 [Build 8265]