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