ngtcp2_encode_transport_params

Synopsis

#include <ngtcp2/ngtcp2.h>

ngtcp2_ssize ngtcp2_encode_transport_params(uint8_t *dest, size_t destlen, ngtcp2_transport_params_type exttype, const ngtcp2_transport_params *params)

ngtcp2_encode_transport_params() encodes params in dest of length destlen.

If dest is NULL, and destlen is zero, this function just returns the number of bytes required to store the encoded transport parameters.

This function returns the number of written, or one of the following negative error codes:

NGTCP2_ERR_NOBUF

Buffer is too small.

NGTCP2_ERR_INVALID_ARGUMENT

exttype is invalid.