From 73aa574f163eb5c0579b1eb684bf0a79b0d7fa61 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 8 Mar 2016 13:08:15 +0100 Subject: [PATCH] coap_io.h: define flag to indicate that data is available Non-blocking sockets can set COAP_ENDPOINT_HAS_DATA in flags to tell coap_read() that this endpoint has new data available for reading. --- include/coap/coap_io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/coap/coap_io.h b/include/coap/coap_io.h index 69c302cb..2a324e5b 100644 --- a/include/coap/coap_io.h +++ b/include/coap/coap_io.h @@ -55,8 +55,10 @@ typedef struct coap_endpoint_t { int flags; } coap_endpoint_t; -#define COAP_ENDPOINT_NOSEC 0x00 -#define COAP_ENDPOINT_DTLS 0x01 +#define COAP_ENDPOINT_NOSEC 0x0000 +#define COAP_ENDPOINT_DTLS 0x0001 + +#define COAP_ENDPOINT_HAS_DATA 0x1000 coap_endpoint_t *coap_new_endpoint(const coap_address_t *addr, int flags);