ngtcp2_conn_set_tls_error ========================= Synopsis -------- *#include * .. function:: void ngtcp2_conn_set_tls_error(ngtcp2_conn *conn, int liberr) `ngtcp2_conn_set_tls_error` sets the TLS related error *liberr* in *conn*. *liberr* must be one of ngtcp2 library error codes (which is defined as NGTCP2_ERR_* macro, such as :macro:`NGTCP2_ERR_DECRYPT`). In general, error code should be propagated via return value, but sometimes ngtcp2 API is called inside callback function of TLS stack, and it does not allow to return ngtcp2 error code directly. In this case, implementation can set the error code (e.g., :macro:`NGTCP2_ERR_MALFORMED_TRANSPORT_PARAM`) using this function. See also `ngtcp2_conn_get_tls_error`.