Skip to content

Add close callback to network interface #634

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

Merged
merged 9 commits into from
Nov 12, 2019
Merged

Add close callback to network interface #634

merged 9 commits into from
Nov 12, 2019

Conversation

gkwicker
Copy link
Contributor

*Issue #524

Description of changes:

  • Add a close callback to the network interface
  • mbedTLS & OpenSSL implementations

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

status = IOT_NETWORK_SUCCESS;
}

IOT_FUNCTION_CLEANUP_END();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be IOT_FUNCTION_EXIT_NO_CLEANUP() to be consistent with the way we use these macros. Same for the mbedtls file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@abhidixi11 abhidixi11 left a comment

Choose a reason for hiding this comment

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

Minor changes about doxygen comments and a question about close reason, otherwise looks good.

* @param[in] pConnection The connection on which data is available, defined by
* the network stack.
* @param[in] reason The reason the connection was closed
* @param[in] pContext The third argument passed to @ref platform_network_function_setreceivecallback.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be platform_network_function_setclosecallback().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, fixed

* A function with this signature may be set with @ref platform_network_function_setclosecallback
* to be invoked when the network connection is closed.
*
* @param[in] pConnection The connection on which data is available, defined by
Copy link
Contributor

Choose a reason for hiding this comment

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

Should read: The connection that is being closed...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, fixed.

@gkwicker gkwicker merged commit fe6d274 into aws:v4_beta Nov 12, 2019
leegeth pushed a commit to leegeth/aws-iot-device-sdk-embedded-C that referenced this pull request Aug 27, 2020
leegeth pushed a commit to leegeth/aws-iot-device-sdk-embedded-C that referenced this pull request Aug 28, 2020
leegeth pushed a commit to leegeth/aws-iot-device-sdk-embedded-C that referenced this pull request Aug 31, 2020
leegeth pushed a commit to leegeth/aws-iot-device-sdk-embedded-C that referenced this pull request Sep 1, 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.

4 participants