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.
COAP_DEPRECATED void coap_clear_event_handler(coap_context_t *context)
Clears the event handler registered with context.
coap_event_t
Scalar type to represent different events, e.g.
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 unction coap_se...
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.
@ COAP_EVENT_SESSION_CONNECTED
CSM exchange events for reliable protocols only.
@ COAP_EVENT_DTLS_CLOSED
(D)TLS events for COAP_PROTO_DTLS and COAP_PROTO_TLS
@ COAP_EVENT_DTLS_CONNECTED
@ COAP_EVENT_SESSION_FAILED
@ COAP_EVENT_PARTIAL_BLOCK
(Q-)Block receive errors
@ COAP_EVENT_SERVER_SESSION_NEW
Called in the CoAP IO loop if a new server-side session is created due to an incoming connection.
@ COAP_EVENT_SESSION_CLOSED
@ COAP_EVENT_SERVER_SESSION_DEL
Called in the CoAP IO loop if a server session is deleted (e.g., due to inactivity or because the max...
@ COAP_EVENT_DTLS_RENEGOTIATE
@ COAP_EVENT_TCP_CONNECTED
TCP events for COAP_PROTO_TCP and COAP_PROTO_TLS.
Platform specific header file for CoAP stack.
The CoAP stack's global state is stored in a coap_context_t object.
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...