MQTT client yield API definitions.
More...
Called to yield the current thread to the underlying MQTT client. This time is used by the MQTT client to manage PING requests to monitor the health of the TCP connection as well as periodically check the socket receive buffer for subscribe messages. Yield() must be called at a rate faster than the keepalive interval. It must also be called at a rate faster than the incoming message rate as this is the only way the client receives processing time to manage incoming messages. This is the outer function which does the validations and calls the internal yield above to perform the actual operation. It is also responsible for client state changes
- Parameters
-
| pClient | Reference to the IoT Client |
| timeout_ms | Maximum number of milliseconds to pass thread execution to the client. |
- Returns
- An IoT Error Type defining successful/failed client processing. If this call results in an error it is likely the MQTT connection has dropped. iot_is_mqtt_connected can be called to confirm.