3 unstable releases

0.2.0-alpha.2 Jan 11, 2024
0.1.0 Nov 13, 2023

#11 in #send-request

Download history 18/week @ 2023-12-21 3/week @ 2023-12-28 122/week @ 2024-01-04 73/week @ 2024-01-11 35/week @ 2024-01-18 772/week @ 2024-01-25 224/week @ 2024-02-01 468/week @ 2024-02-08 157/week @ 2024-02-15 157/week @ 2024-02-22 21/week @ 2024-02-29 49/week @ 2024-03-07 563/week @ 2024-03-14 186/week @ 2024-03-21 123/week @ 2024-03-28 33/week @ 2024-04-04

908 downloads per month
Used in 3 crates

MIT/Apache

9KB

coap-request

The coap-request crate defines an interface provided by a CoAP client stack towards applications that can send requests through it.

It is the client side equivalent of the coap-handler crate.

Usability

This crate provides a very low-level and generic interface, which is not ideal for every-day "GET me the plain text content of coap://example.com/foo" style requests. The crate coap-request-implementations will fill the gap, just as coap-handler-implementations does for coap-handler.

Caveats

There boundary of responsibilities for respecting protocol level requirements is not clearly established yet. For example, it is unclear how the application learns special option encoding rules it needs to follow given the transport, or whether other operations on the same stack have concluded their operations w/rt Request-Tag processing.

It is unclear yet whether the async functions should be Send or not (or whether distinct traits are needed to cater for both cases).

The [Request] trait is not suitable for requests for which responses are processed in a pooled fashion (where every response comes in to a single handler to be dissected later); in particular, this trait doesn't lend itself to the implementation of a stateless proxy that uses long encrypted tokens to restore the application state. This may be resolved in a variant of the trait that not only allows later requests to be sent on the same token (as is necessary to orderly close observations) but also to send a family of requests on the same "channel" -- however, that would be a rather nice thing.

License: MIT OR Apache-2.0

Dependencies

~185KB