Struct coap::client::CoAPClient
[−]
[src]
pub struct CoAPClient { /* fields omitted */ }
Methods
impl CoAPClient
[src]
fn new<A: ToSocketAddrs>(addr: A) -> Result<CoAPClient>
Create a CoAP client with the peer address.
fn request_with_timeout(
url: &str,
timeout: Option<Duration>
) -> Result<CoAPResponse>
url: &str,
timeout: Option<Duration>
) -> Result<CoAPResponse>
Execute a request with the coap url and a specific timeout. Default timeout is 5s.
fn request(url: &str) -> Result<CoAPResponse>
Execute a request with the coap url.
fn send(&self, request: &CoAPRequest) -> Result<()>
Execute a request.
fn receive(&self) -> Result<CoAPResponse>
Receive a response.
fn set_receive_timeout(&self, dur: Option<Duration>) -> Result<()>
Set the receive timeout.