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

client: Generate message ID for all block transfer #106

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

jloxfo2
Copy link
Contributor

@jloxfo2 jloxfo2 commented Nov 4, 2024

Generate and set the message ID when handling a Block2 Option in the response (such as a 2.05 response for GET). When using either Block1 or Block2 options, a single operation can be split into multiple CoAP message exchanges. As specified in [RFC7252], each of these message exchanges uses their own CoAP Message ID.

This commit also updates the send_request() API to conditionally generate and set a message ID in the non-block transfer path. The intent is to make the API consistent with the block transfer path, which always generates and overrides the message ID, but preserve the previous behavior of allowing callers to provide their own non-zero message IDs (e.g. allow an observer to manage its own message ID).

https://datatracker.ietf.org/doc/html/rfc7959#section-2.3
https://datatracker.ietf.org/doc/html/rfc7252#section-4

Generate and set the message ID when handling a Block2 Option in the
response (such as a 2.05 response for GET). When using either Block1 or
Block2 options, a single operation can be split into multiple CoAP
message exchanges. As specified in [RFC7252], each of these message
exchanges uses their own CoAP Message ID.

This commit also updates the send_request() API to conditionally
generate and set a message ID in the non-block transfer path. The intent
is to make the API consistent with the block transfer path, which always
generates and overrides the message ID, but preserve the previous
behavior of allowing callers to provide their own non-zero message IDs
(e.g. allow an observer to manage its own message ID).

https://datatracker.ietf.org/doc/html/rfc7959#section-2.3
https://datatracker.ietf.org/doc/html/rfc7252#section-4
@jloxfo2
Copy link
Contributor Author

jloxfo2 commented Nov 4, 2024

It looks like some tests are still failing due to coap.me being down

@Covertness , if the change is merged, can the crate version be updated to "0.19.1" on crates.io?

@Covertness Covertness merged commit 673651d into Covertness:master Nov 9, 2024
0 of 2 checks passed
@Covertness
Copy link
Owner

v0.19.1 released

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.

2 participants