dwnx_ccerr_set_liberr
Synopsis
#include <dwnx/dwnx.h>
-
void dwnx_ccerr_set_liberr(dwnx_ccerr *ccerr, int liberr, const uint8_t *reason, size_t reasonlen)
dwnx_ccerr_set_liberr()sets type and error_code based on liberr.reason is the reason phrase of length reasonlen. This function does not make a copy of the reason phrase.
If liberr is
DWNX_ERR_IDLE_CLOSE,ccerr->typeis set todwnx_ccerr_type.DWNX_CCERR_TYPE_IDLE_CLOSE, andccerr->error_codetoDWNX_NO_ERROR.Otherwise,
ccerr->typeis set todwnx_ccerr_type.DWNX_CCERR_TYPE_TRANSPORT, andccerr->error_codeis set to an error code inferred by liberr (seedwnx_err_infer_quic_transport_error_code()).