An application can register a callback function of type
coap_event_handler_t that will be called by the library on certain
events. Currently, the DTLS implementation invokes coap_handle_event()
with session-specific events such as session close or
renegotiation.