This allows the application to keep track of the underlying DTLS connection state and act accordingly.