-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[RFC] CoAP API updates for options #9048
Comments
I just modified the page to require use of coap_opt_finish(), including addition of a parameter to specify that a payload is expected. This addition allows writing the payload marker at this point. Previously, the idea was to maintain the payload marker at all times to avoid use of coap_opt_finish() if no options. I think that approach is too error prone and susceptible to off-by-one. |
Building up to a WIP PR in my nanocoap/build_request_pkt branch. |
I just modified the page to remove the 'flags' attribute from coap_pkt_t. Instead, the user requests to sort options via a bitwise parameter in coap_opt_finish(). The addition of the sort function is controlled by a compile time macro. |
This RFC has served its purpose. #9085 implements the API for nanocoap, and #9156, which partially adapts gcoap for the API, is almost complete. CoAP API Options Update wiki page still is valid and useful. |
Description
Discussion for nanocoap/gcoap API updates to support use of options as defined in #8772. See CoAP API Options Update wiki page for the proposal.
Also see #8920, which triggered the proposal.
The text was updated successfully, but these errors were encountered: