dwnx_ccerr_set_application_error

Synopsis

#include <dwnx/dwnx.h>

void dwnx_ccerr_set_application_error(dwnx_ccerr *ccerr, uint64_t error_code, const uint8_t *reason, size_t reasonlen)

dwnx_ccerr_set_application_error() sets ccerr->type to dwnx_ccerr_type.DWNX_CCERR_TYPE_APPLICATION, and ccerr->error_code to error_code. reason is the reason phrase of length reasonlen. This function does not make a copy of the reason phrase.