Imported Upstream version 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_submit_settings.rst
1
2 nghttp2_submit_settings
3 =======================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_submit_settings(nghttp2_session *session, uint8_t flags, const nghttp2_settings_entry *iv, size_t niv)
11
12     
13     Stores local settings and submits SETTINGS frame.  The *iv* is the
14     pointer to the array of :type:`nghttp2_settings_entry`.  The *niv*
15     indicates the number of :type:`nghttp2_settings_entry`.
16     
17     The *flags* is currently ignored and should be
18     :macro:`nghttp2_flag.NGHTTP2_FLAG_NONE`.
19     
20     This function does not take ownership of the *iv*.  This function
21     copies all the elements in the *iv*.
22     
23     While updating individual stream's local window size, if the window
24     size becomes strictly larger than NGHTTP2_MAX_WINDOW_SIZE,
25     RST_STREAM is issued against such a stream.
26     
27     SETTINGS with :macro:`nghttp2_flag.NGHTTP2_FLAG_ACK` is
28     automatically submitted by the library and application could not
29     send it at its will.
30     
31     This function returns 0 if it succeeds, or one of the following
32     negative error codes:
33     
34     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
35         The *iv* contains invalid value (e.g., initial window size
36         strictly greater than (1 << 31) - 1.
37     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
38         Out of memory.