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

Pre-buffer offset? #61

Open
chrysn opened this issue Feb 11, 2022 · 0 comments
Open

Pre-buffer offset? #61

chrysn opened this issue Feb 11, 2022 · 0 comments

Comments

@chrysn
Copy link

chrysn commented Feb 11, 2022

The separation of buffer (with its end) and length already allows having nanoCBOR encoded into the first block of a CoAP block-wise response. Would it be reasonable to extend the encoder by a field that counts how many initially encoded bytes to discard? (Similar to how the produced length tells how many bytes were discarded after the buffer).

I don't have a full use case yet, but looked at @silkeh's RIOT-OS/RIOT#17571, and that would appear to work great with CoAP block-wise. So this is not a full feature request yet, more like a "would it make sense to add this feature?"

(And it may happen that the next request is then for a checksum field that all the input is fed into, which would then generate ETags to detect whether the blocks can even be assembled).

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

No branches or pull requests

1 participant