3 unstable releases

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

#13 in #send-request

Download history 152/week @ 2024-06-02 113/week @ 2024-06-09 149/week @ 2024-06-16 184/week @ 2024-06-23 251/week @ 2024-06-30 264/week @ 2024-07-07 135/week @ 2024-07-14 8/week @ 2024-07-21 32/week @ 2024-07-28 174/week @ 2024-08-04 41/week @ 2024-08-11 2145/week @ 2024-08-18 538/week @ 2024-08-25 279/week @ 2024-09-01 694/week @ 2024-09-08 811/week @ 2024-09-15

2,388 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

~195KB