Struct embedded_nal_coap::CoAPRuntimeClient
source · pub struct CoAPRuntimeClient<'a, const CONCURRENT_REQUESTS: usize> { /* private fields */ }
Expand description
Access to the client side of a CoAPShared
From this, requests can be be started through the [.to()
] method.
This is the “runtime” variant because it can be copied around arbitrarily, and requests made
through it take any available of the CONCURRENT_REQUESTS
slots.
Note that requests sent through this only make progress while the socket part of it is
[.run()]
(and being awaited).
Implementations§
source§impl<'a, const CONCURRENT_REQUESTS: usize> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
impl<'a, const CONCURRENT_REQUESTS: usize> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
sourcepub fn to(
&self,
address: SocketAddr
) -> RequestingCoAPClient<'_, CONCURRENT_REQUESTS>
pub fn to( &self, address: SocketAddr ) -> RequestingCoAPClient<'_, CONCURRENT_REQUESTS>
Set up a request to a particular network peer
This starts off a builder that (as of now) is immediately usable as a
coap_request::Stack; on the long run, this may gain extra builder steps (such as a
.reliably()
or .unreliably()
, or .longrunning()
to tap into a larger token space), or
more diverse .to_...()
methods for better control.
FIXME: Currently, requests set up this way are sent as CONs but without retransmission.
Trait Implementations§
source§impl<'a, const CONCURRENT_REQUESTS: usize> Clone for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
impl<'a, const CONCURRENT_REQUESTS: usize> Clone for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
source§fn clone(&self) -> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
fn clone(&self) -> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more