mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-06 17:52:54 +03:00
Replace COAP_RUN_BLOCK with COAP_IO_WAIT and COAP_RUN_NOBLOCK with COAP_IO_NO_WAIT for naming clarity. Instead of COAP_IO_NO_WAIT being 1, make it -1 to fix 1ms busy loop. Handle the case when coap_io_prepare_io returns 0 to prevent indefinite select() wait. include/coap2/net.h: Make the timeout_ms parameter uint32_t in coap_io_process*() functions to make sure special case of COAP_IO_NO_BLOCK is correctly handled on different architectures. Update COAP_IO_NO_BLOCK to -1. src/coap_io.c: Fix the 1ms busy loop and potential infinite wait in the non epoll case. man/coap_io.txt.in: Update documentation to reflect the changes. examples/coap-server.c: examples/contiki/server.c: Update to use COAP_IO WAIT and COAP_IO_NO_WAIT as appropriate.