Leandro Lanzieri
3f382dc323
net/gcoap: Use COAP_RANDOM_FACTOR_1000 to calculate timeout range
...
With this the range for the random timeout is calculated using
COAP_RANDOM_FACTOR_1000 (ACK_RANDOM_FACTOR in RFC 7252).
2020-01-27 19:47:20 +01:00
Hauke Petersen
3fd8357071
net/gcoap: allow to pass user context to requests
2019-11-28 12:50:24 +01:00
Hauke Petersen
383f395af3
net/gcoap: pass memo to resp_handler directly
2019-11-28 12:48:37 +01:00
Hauke Petersen
17b1b19fda
net/gcoap: do not allocate RX buf on stack
2019-11-26 15:00:03 +01:00
d4f3747705
sys/net: fix typos
2019-11-23 22:39:38 +01:00
bde253cca3
gcoap: use coap_method_flags_t
2019-09-09 09:40:14 +02:00
Benjamin Valentin
e8dc1119b8
sys: make use of ARRAY_SIZE macro
2019-08-06 19:43:54 +02:00
Ken Bannister
c8e87e7854
Merge pull request #11787 from miri64/gcoap/enh/backoff-config
...
gcoap: allow for retransmission backoff to be turned off
2019-08-02 06:40:07 -04:00
Ken Bannister
28317019fc
Merge pull request #11784 from miri64/gcoap/fix/ack-variance-0
...
gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
2019-08-02 05:10:45 -04:00
Leandro Lanzieri
a9ab9d37e2
Merge pull request #11765 from kb2ma/coap/encode_resources
...
net/gcoap: add/publish link format attributes for a resource
2019-07-27 22:36:33 +02:00
Ken Bannister
d481ca9da7
net/gcoap: add selectable function to write a link
2019-07-27 07:09:40 -04:00
Martine S. Lenders
c31c9ed216
gcoap: allow for retransmission backoff to be turned off
2019-07-03 16:35:48 +02:00
Martine S. Lenders
1bde141697
gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
...
`COAP_ACK_VARIANCE` is a configurable macro, so when it is 0, the
[precondition for `random_uint32_range()`][1] is not held.
[1]: https://doc.riot-os.org/group__sys__random.html#gab6ee09e1e56df3cc78acd1fbf97bfb24
2019-07-03 15:45:45 +02:00
Martine S. Lenders
c9179a26c8
gcoap: replace internal references to gcoap_req_send2()
...
`gcoap_req_send2()` is deprecated and was replaced with
`gcoap_req_send()`.
2019-07-03 15:00:06 +02:00
Martine Lenders
a11f817604
gcoap: rename gcoap_req_send2() to gcoap_req_send()
2019-04-25 13:40:32 +02:00
Martine Lenders
affd115405
gcoap: remove deprecated function gcoap_req_send()
2019-04-25 13:39:50 +02:00
88171698e0
Merge pull request #10931 from kb2ma/nanocoap/pktapi_opt_enospc
...
net/nanocoap: Packet API return error if buffer full
2019-04-03 14:49:44 +02:00
Ken Bannister
3cdf43607c
net/nanocoap: Return error from coap_opt_add_xxx() if no space
2019-03-19 05:30:04 -04:00
Leandro Lanzieri
6bb4158c31
sys/net/application_layer/nanocoap: Add path prefix opt
...
This adds a prefix option for the methods field of a coap resource and
modifies the way the path is matched on a request to accept prefix
matching.
2019-03-17 14:26:11 +01:00
Ken Bannister
93da7372fd
net/gcoap: use coap_opt_finish within gcoap
2019-01-27 08:56:26 -05:00
Ken Bannister
0e1c3ebe50
net/gcoap: make options buf macros configurable
2019-01-16 12:41:06 -05:00
Ken Bannister
bec94b0b7a
net/gcoap: allow NULL path in gcoap_req_init()
2018-11-28 13:20:22 -05:00
Ken Bannister
424a01ddc1
net/gcoap: remove gcoap attributes from coap_pkt_t
2018-11-24 07:09:25 -05:00
Ken Bannister
034c78d51c
net/gcoap: move macros to implementation file
2018-11-24 07:09:25 -05:00
Ken Bannister
f0b966d65d
net/gcoap: Use nanocoap options API
...
Observe still uses coap_pkt_t attribute.
2018-11-24 07:09:25 -05:00
Ken Bannister
fa5ab4eeb6
net/gcoap: Add format option to nanocoap
2018-11-24 07:09:25 -05:00
Lasse Lueder
34a6e384c2
net/gcoap: use coap_data_ptr instead of hdr.data
2018-11-02 16:33:29 +01:00
726ebf3dad
coap: use COAP_FORMAT style content-format defines
...
Replaces all occurences of COAP_CT_.* with COAP_FORMAT_.*
2018-10-15 09:44:17 +02:00
05b6af466c
sys: add missig <string.h> includes
2018-09-20 23:47:40 +02:00
Hauke Petersen
f2b1c5c87d
net/gcoap: use sock_udp_ep_equal()
2018-09-07 12:03:19 +02:00
Hauke Petersen
a3b8c90485
net/gcoap: adjust to nanocoap changes
2018-08-30 10:31:03 +02:00
Pekka Nikander
8f10d65ad5
net/gcoap: Make references to coap_resource_t const in gcoap
...
A CoAP resource is a primary object between the application
and CoAP library. The Library needs the paths, methods,
and handlers from it, so that it can call the right handler.
However, it never needs to change any of them.
The application also needs the resources. The application
may want to declare the resources as const, since it may
want to store them in flash.
2018-07-30 09:00:21 +03:00
Ken Bannister
4f8c3b7d18
Merge pull request #9310 from miri64/gcoap/enh/clients-without-response-handlers
...
gcoap: don't allocate memo for clients without response handlers
2018-06-15 10:28:30 -04:00
Martine Lenders
b03aa528e8
gcoap: don't allocate memo for clients without response handlers
2018-06-15 09:46:50 +02:00
Ken Bannister
2c02ed2093
net/gcoap: refine observe re-registration
...
Fix re-register when using the same token.
Handle edge cases when change token for a resource.
Only set observer and resource on initial registration.
Discuss re-registration in documentation.
2018-06-05 09:23:16 -04:00
Martine Lenders
57d3c4698c
gcoap: don't drop observer on re-register
...
With #9209 gCoAP got the ability to re-register and OBSERVE with a new
token, sadly the `observer` variable wasn't set in that fix, so a
re-registration actually led to the deletion of the observer (because it
is still `NULL` when the old registration is overwritten in l. 317)
2018-05-30 23:05:25 +02:00
Ken Bannister
d7dde2dded
net/gcoap: observer re-register with new token
2018-05-29 13:30:05 -04:00
smlng
b9ca8f466f
gcoap: add asserts for path in gcoap_req_init
2018-05-22 21:28:58 +02:00
smlng
c9e9f72454
gcoap: use const path parameter
2018-05-22 21:28:58 +02:00
Martine Lenders
8a46cf611e
gcoap: make message queue size configurable
2018-05-06 16:41:43 +02:00
Martine Lenders
3c93ebc86e
Merge pull request #7699 from nmeum/gcoap-method-not-allowed
...
gcoap: return Method Not Allowed if appropriate
2018-04-06 15:35:05 +02:00
Ken Bannister
3da9145018
net/gcoap: Internalize definition of state struct
2018-03-31 06:46:05 -04:00
Hauke Petersen
a63f92a7a6
net/gcoap: allow to not define a response handler
2018-03-19 11:56:58 +01:00
Ken Bannister
d7004ebcd8
Merge pull request #8513 from kaspar030/nanocoap_add_context_to_resources
...
nanocoap: add context pointer to resources
2018-02-22 18:30:43 +00:00
Ken Bannister
81ecd37a5e
net/gcoap: fix sock send return type
2018-02-17 06:20:38 -05:00
aa52f5334b
sys/net/gcoap: adapt to resource context ptr
2018-02-02 19:01:58 +01:00
Sebastian Meiling
50f3d6a427
Merge pull request #7337 from kb2ma/gcoap/confirm_piggy_client
...
net/gcoap: Confirmable request with piggybacked ACK response
2018-01-16 20:35:32 +01:00
Sebastian Meiling
0d1f40393f
Merge pull request #8362 from beduino-project/gcoap-check-for-ndebug
...
gcoap: check if NDEBUG is defined
2018-01-16 13:18:41 +01:00
Ken Bannister
4223de6b8b
net/gcoap: automate retries for confirm timeout
2018-01-16 06:37:29 -05:00
Sören Tempel
89edc437d5
gcoap: remove the #ifdef DEVELHELP
...
To make sure the cf variable doesn't trigger an `unsed variable` warning
when compile with `-DNDEBUG`.
2018-01-16 11:06:28 +01:00