Passing a timeout value of 0 will run the loop for a single iteration. If a dummy MQTTGetCurrentTimeFunc_t was passed to MQTT_Init, then this timeout MUST be set to 0.
Parameters
[in]
pContext
Initialized and connected MQTT context.
[in]
timeoutMs
Minimum time in milliseconds that the receive loop will run, unless an error occurs.
Returns
MQTTBadParameter if context is NULL; MQTTRecvFailed if a network error occurs during reception; MQTTSendFailed if a network error occurs while sending an ACK or PINGREQ; MQTTBadResponse if an invalid packet is received; MQTTIllegalState if an incoming QoS 1/2 publish or ack causes an invalid transition for the internal state machine; MQTTSuccess on success.