RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.94k stars 1.99k forks source link

gcoap: improve block-wise transfer API. #16715

Open miri64 opened 3 years ago

miri64 commented 3 years ago

Description

After working a bit with block-wise transfer in both gcoap and libcoap, I kind of hate how block-wise transfer is handled in gcoap. A lot of work is already taken of once shoulder by using the slicer (which is also non-obvious, because there are no examples for that in the repo), but still there is a lot of in-depth knowledge about RFC 7959 required to enable you to exchange large data. libcoap solves quiet nicely (but still far from perfect), by having _large_ versions of functions that could require block-wise transfer that hide most of the mechanics of block-wise transfer from the user. A similar user-friendly approach would be desirable.

Useful links

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

miri64 commented 2 years ago

The blockwise tranfer with nanocoap is improved in #17958, but something similar should also be provided for gcoap.