Function embedded_nal_minimal_coapserver::poll[][src]

pub fn poll<ST: ?Sized>(
    stack: &ST,
    socket: &mut ST::UdpSocket,
    handler: &mut impl Handler
) -> Result<(), ST::Error> where
    ST: UdpServer

Attempt to process one message out of the given socket on a UDP stack.

Any CoAP requests are dispatched to the handler. A response is built immediately and sent.

Failure to perform any action immediately makes the function return WouldBlock, and it should be called again whenever there is indication that the network device is ready again. Any errors from the stack are propagated out. Errors in message processing (eg. invalid CoAP messages) are treated as per the protocol and are not indicated separately; they cause a successful return.

Note that the caveats in the module description apply.