libcoap 4.3.5-develop-72190a8
|
API for event delivery from lower-layer library functions. More...
Typedefs | |
typedef int(* | coap_event_handler_t) (coap_session_t *session, const coap_event_t event) |
Type for event handler functions that can be registered with a CoAP context using the function coap_set_event_handler(). | |
Functions | |
void | coap_register_event_handler (coap_context_t *context, coap_event_handler_t hnd) |
Registers the function hnd as callback for events from the given CoAP context context . | |
API for event delivery from lower-layer library functions.
typedef int(* coap_event_handler_t) (coap_session_t *session, const coap_event_t event) |
Type for event handler functions that can be registered with a CoAP context using the function coap_set_event_handler().
session | The current CoAP session. |
event | The event type that has occurred. |
0
No further action required by libcoap 1
Depending from where called, libcoap may take further action (reserved for future use) Definition at line 146 of file coap_event.h.
enum coap_event_t |
Scalar type to represent different events, e.g.
DTLS events or retransmission timeouts.
Definition at line 34 of file coap_event.h.
void coap_register_event_handler | ( | coap_context_t * | context, |
coap_event_handler_t | hnd | ||
) |
Registers the function hnd
as callback for events from the given CoAP context context
.
Any event handler that has previously been registered with context
will be overwritten by this operation.
context | The CoAP context to register the event handler with. |
hnd | The event handler to be registered. NULL if to be de-registered. |
Definition at line 24 of file coap_event.c.