Mcast: Support multiple large blocked body responses

When initating a multicast request, multiple unicast responses can occur.

If the unicast response subsequently generates further traffic (in other words
a BLOCK1 or BLOCK2 transfer) to complete the request/response sequence, each
unicast transfer can behave differently.

Set up different coap_lg_crcv_t for each unicast response for the session.

Set up different coap_lg_xmit_t for each unicast request if doing large transmits.

Reference initial transmitted request PDU rather than maintaining copies of the
PDU in coap_lg_crcv_t or coap_lg_xmit_t.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2025-05-05 09:12:30 +01:00
1 parent d03c0d4145
commit 2e8decf756
7 files changed
+373 -233

No files matched your search

+4 -3
View File
@@ -492,8 +492,9 @@ response_handler(coap_session_t *session COAP_UNUSED,
track_flush_token(&token, 0);
/* our job is done, we can exit at any time */
ready = doing_observe ? coap_check_option(received,
COAP_OPTION_OBSERVE, &opt_iter) == NULL : 1;
ready = is_mcast ? 0 : doing_observe ?
coap_check_option(received,
COAP_OPTION_OBSERVE, &opt_iter) == NULL : 1;
return COAP_RESPONSE_OK;
}
@@ -2100,7 +2101,7 @@ main(int argc, char **argv) {
coap_delete_pdu(pdu);
coap_delete_pdu(resp_pdu);
if (!doing_observe && repeat_count == 1) {
if (!is_mcast && !doing_observe && repeat_count == 1) {
quit = 1;
}
repeat_count--;