request-tag: Add in support for sending Request-Tag option with every request

If multiple requests (apart from DELETE) are sent at the same time to
the same resource, and the responses need to make use of the Block2 option,
there is no way for the server to differentiate between which block set a
request (if there is a resource content change) is for unless a Request-Tag
is used.

Disable this functionality by setting COAP_BLOCK_NO_PREEMPTIVE_RTAG when
calling coap_context_set_block_mode().  Request-Tag will still be sent
with any request that includes Block1 option.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2022-11-26 12:47:21 +00:00
1 parent 1b6498fab5
commit c9f40d7d09
8 files changed
+310 -233

No files matched your search

+1 -1
View File
@@ -556,7 +556,7 @@ usage(const char *program, const char *version) {
"\t-K interval\tSend a ping after interval seconds of inactivity\n"
"\t-L value\tSum of one or more COAP_BLOCK_* flag valuess for block\n"
"\t \t\thandling methods. Default is 1 (COAP_BLOCK_USE_LIBCOAP)\n"
"\t \t\t(Sum of one or more of 1,2,4 and 8)\n"
"\t \t\t(Sum of one or more of 1,2 and 16)\n"
"\t-N \t\tSend NON-confirmable message\n"
"\t-O num,text\tAdd option num with contents text to request. If the\n"
"\t \t\ttext begins with 0x, then the hex text (two [0-9a-f] per\n"