nanocoap Notes - kb2ma/RIOT GitHub Wiki
I am using Kaspar Schleiser's nanocoap as a module within RIOT, and extending it as needed for use by gcoap. This page lists the extensions for reference and discussion.
Removed dependency on posix_sockets. Requires:
- Don't use arpa/inet.h header. Use sys/types.h for ssize_t defintion.
- Use HTONS/NTOHS from byteorder.h rather then htons()/ntohs().
Added many #defines for CoAP codes. Move all such defines here? There also are a few values with different names in nanocoap vs. gcoap.
coap_parse() -- Set the payload length to zero at the top in case there is not a payload for the response. Also set the value for the token pointer. Add handling for content format with value length of zero.
coap_put_option_ct() -- content_type of 0 is valid; has zero length value
coap_put_option_url() -- handle zero length segment, "//".