libcoap 4.3.5-develop-19cef11
|
Event handling. More...
#include "libcoap.h"
Go to the source code of this file.
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(). More... | |
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 . More... | |
COAP_DEPRECATED void | coap_set_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 . More... | |
COAP_DEPRECATED void | coap_clear_event_handler (coap_context_t *context) |
Clears the event handler registered with context . More... | |
Event handling.
Definition in file coap_event.h.
COAP_DEPRECATED void coap_clear_event_handler | ( | coap_context_t * | context | ) |
Clears the event handler registered with context
.
context | The CoAP context whose event handler is to be removed. |
Definition at line 36 of file coap_event.c.
COAP_DEPRECATED void coap_set_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. |
Definition at line 30 of file coap_event.c.