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

Improve support for blockwise transfer #3

Open
4 tasks
pulsastrix opened this issue Nov 19, 2022 · 0 comments
Open
4 tasks

Improve support for blockwise transfer #3

pulsastrix opened this issue Nov 19, 2022 · 0 comments
Labels
enhancement New feature or request libcoap-parity Features that libcoap offers, but libcoap-rs currently does not
Milestone

Comments

@pulsastrix
Copy link
Member

Summary

Provide an API for users to directly send and receive data blocks when blockwise transfer is used.

Description

The current version of the binding delegates the handling of large requests and blockwise transfers to the underlying libcoap C library by setting the COAP_BLOCK_USE_LIBCOAP flag.
While this is probably the best default approach to take, it should also be possible for library users to receive and resassemble the blocks separately if they so wish.

Additionally, the CoapMessage to coap_pdu_t conversion in libcoap/src/message.rs#431 has to be extended to support large/blockwise response messages. For this purpose, it might be necessary to keep the request PDU associated with the response Message, as the request PDU is required for coap_add_data_large_response.

Implementation steps

  • Evaluate possible approaches for blockwise Transfer API design
  • Implement blockwise transfer API
  • Evaluate necessary changes to CoapMessage and/or CoapResponse data structure to contain the request PDU necessary for coap_add_data_large_response.
  • Implement necessary changes in CoapMessage, CoapResponse and CoapMessage::apply_to_raw_pdu

(Issue moved over from GitLab)

@pulsastrix pulsastrix added the enhancement New feature or request label Nov 19, 2022
@pulsastrix pulsastrix changed the title Improve Support for Blockwise Transfer Improve support for blockwise transfer Nov 19, 2022
@pulsastrix pulsastrix added this to the v0.3.0 milestone Jul 19, 2024
@pulsastrix pulsastrix added the libcoap-parity Features that libcoap offers, but libcoap-rs currently does not label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request libcoap-parity Features that libcoap offers, but libcoap-rs currently does not
Projects
None yet
Development

No branches or pull requests

1 participant