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
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
tocoap_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 forcoap_add_data_large_response
.Implementation steps
CoapMessage
and/orCoapResponse
data structure to contain the request PDU necessary forcoap_add_data_large_response
.CoapMessage
,CoapResponse
andCoapMessage::apply_to_raw_pdu
(Issue moved over from GitLab)