Struct coap::server::CoAPServer
[−]
[src]
pub struct CoAPServer { /* fields omitted */ }
Methods
impl CoAPServer
[src]
pub fn new<A: ToSocketAddrs>(addr: A) -> Result<CoAPServer>
[src]
Creates a CoAP server listening on the given address.
pub fn handle<H: CoAPHandler + 'static>(
&mut self,
handler: H
) -> Result<(), CoAPServerError>
[src]
&mut self,
handler: H
) -> Result<(), CoAPServerError>
Starts handling requests with the handler
pub fn stop(&mut self)
[src]
Stop the server.
pub fn set_worker_num(&mut self, worker_num: usize)
[src]
Set the number of threads for handling requests