nghttp3_qpack_encoder_new

Synopsis

#include <nghttp3/nghttp3.h>

int nghttp3_qpack_encoder_new(nghttp3_qpack_encoder **pencoder, size_t hard_max_dtable_capacity, const nghttp3_mem *mem)

nghttp3_qpack_encoder_new() initializes QPACK encoder. pencoder must be non-NULL pointer. hard_max_dtable_capacity is the upper bound of the dynamic table capacity. mem is a memory allocator. This function allocates memory for nghttp3_qpack_encoder itself, and assigns its pointer to *pencoder if it succeeds.

The maximum dynamic table capacity is still 0. In order to change the maximum dynamic table capacity, call nghttp3_qpack_encoder_set_max_dtable_capacity().

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

NGHTTP3_ERR_NOMEM

Out of memory.