Imported Upstream version 1.0.0
[platform/upstream/nghttp2.git] / doc / nghttp2_hd_deflate_change_table_size.rst
1
2 nghttp2_hd_deflate_change_table_size
3 ====================================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, size_t settings_hd_table_bufsize_max)
11
12     
13     Changes header table size of the *deflater* to
14     *settings_hd_table_bufsize_max* bytes.  This may trigger eviction
15     in the dynamic table.
16     
17     The *settings_hd_table_bufsize_max* should be the value received in
18     SETTINGS_HEADER_TABLE_SIZE.
19     
20     The deflater never uses more memory than
21     ``deflate_hd_table_bufsize_max`` bytes specified in
22     `nghttp2_hd_deflate_new()`.  Therefore, if
23     *settings_hd_table_bufsize_max* > ``deflate_hd_table_bufsize_max``,
24     resulting maximum table size becomes
25     ``deflate_hd_table_bufsize_max``.
26     
27     This function returns 0 if it succeeds, or one of the following
28     negative error codes:
29     
30     :macro:`NGHTTP2_ERR_NOMEM`
31         Out of memory.