Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: Generate message ID for all block transfer
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
- Loading branch information