ngtcp2_transport_params_decode

Synopsis

#include <ngtcp2/ngtcp2.h>

int ngtcp2_transport_params_decode(ngtcp2_transport_params *params, const uint8_t *data, size_t datalen)

ngtcp2_transport_params_decode() decodes transport parameters in data of length datalen, and stores the result in the object pointed by params.

If an optional parameter is missing, the default value is assigned.

The following fields may point to somewhere inside the buffer pointed by data of length datalen:

This function returns 0 if it succeeds, or one of the following negative error codes:

NGTCP2_ERR_MALFORMED_TRANSPORT_PARAM

The input is malformed.