Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement transport send and receive timeouts in coreHTTP #83

Merged
merged 19 commits into from
Dec 11, 2020

Conversation

sarenameas
Copy link
Contributor

@sarenameas sarenameas commented Dec 11, 2020

This PR implements send and receive timeouts for HTTPClient_Send() just as coreMQTT does for MQTT_ProcessLoop and MQTT_RecieveLoop did here: FreeRTOS/coreMQTT#120

This extra layer of protection allows receiving or sending data after small interrupts in the transport layer.

Before, sendHttpData() had the potential to loop forever which would be devastating in a single threaded environment.
Before, receiving the response would stop as soon as zero was returned from the transport receive. Zero was updated in the transport_interface.h file to mean "no data available right now". We want to try again, if the application desires, for a bit more robustness.

@sarenameas sarenameas marked this pull request as ready for review December 11, 2020 07:29
source/core_http_client.c Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
docs/doxygen/pages.dox Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
source/core_http_client.c Outdated Show resolved Hide resolved
docs/doxygen/pages.dox Outdated Show resolved Hide resolved
Copy link
Contributor Author

@sarenameas sarenameas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dummy comment to address Github UI issues.

leegeth
leegeth previously approved these changes Dec 11, 2020
@sarenameas sarenameas merged commit 0acf94e into FreeRTOS:main Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants