Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
aws_iot_mqtt_client_yield.c File Reference
MQTT client yield API definitions. More...
Go to the source code of this file.
Functions | |
| static void | _aws_iot_mqtt_force_client_disconnect (AWS_IoT_Client *pClient) |
| This is for the case when the aws_iot_mqtt_internal_send_packet Fails. | |
| static IoT_Error_t | _aws_iot_mqtt_internal_yield (AWS_IoT_Client *pClient, uint32_t timeout_ms) |
| Yield to the MQTT client. | |
| IoT_Error_t | aws_iot_mqtt_yield (AWS_IoT_Client *pClient, uint32_t timeout_ms) |
| Yield to the MQTT client. | |
Detailed Description
MQTT client yield API definitions.
Definition in file aws_iot_mqtt_client_yield.c.
Function Documentation
| static void _aws_iot_mqtt_force_client_disconnect | ( | AWS_IoT_Client * | pClient ) | [static] |
This is for the case when the aws_iot_mqtt_internal_send_packet Fails.
Definition at line 47 of file aws_iot_mqtt_client_yield.c.
| static IoT_Error_t _aws_iot_mqtt_internal_yield | ( | AWS_IoT_Client * | pClient, |
| uint32_t | timeout_ms | ||
| ) | [static] |
Yield to the MQTT client.
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 internal function which is called by the yield API to perform the operation. Not meant to be called directly as it doesn't do validations or 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.
Definition at line 183 of file aws_iot_mqtt_client_yield.c.
| IoT_Error_t aws_iot_mqtt_yield | ( | AWS_IoT_Client * | pClient, |
| uint32_t | timeout_ms | ||
| ) |
Yield to the MQTT client.
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.
Definition at line 271 of file aws_iot_mqtt_client_yield.c.
Generated on Tue Jul 12 2022 19:02:38 by
1.7.2