2 nghttp2_submit_window_update
3 ============================
8 *#include <nghttp2/nghttp2.h>*
10 .. function:: int nghttp2_submit_window_update(nghttp2_session *session, uint8_t flags, int32_t stream_id, int32_t window_size_increment)
13 Submits WINDOW_UPDATE frame.
15 The *flags* is currently ignored and should be
16 :macro:`nghttp2_flag.NGHTTP2_FLAG_NONE`.
18 The *stream_id* is the stream ID to send this WINDOW_UPDATE. To
19 send connection level WINDOW_UPDATE, specify 0 to *stream_id*.
21 If the *window_size_increment* is positive, the WINDOW_UPDATE with
22 that value as window_size_increment is queued. If the
23 *window_size_increment* is larger than the received bytes from the
24 remote endpoint, the local window size is increased by that
25 difference. If the sole purpose is to increase the local window
26 size, consider to use `nghttp2_session_set_local_window_size()`.
28 If the *window_size_increment* is negative, the local window size
29 is decreased by -*window_size_increment*. If automatic
30 WINDOW_UPDATE is enabled
31 (`nghttp2_option_set_no_auto_window_update()`), and the library
32 decided that the WINDOW_UPDATE should be submitted, then
33 WINDOW_UPDATE is queued with the current received bytes count. If
34 the sole purpose is to decrease the local window size, consider to
35 use `nghttp2_session_set_local_window_size()`.
37 If the *window_size_increment* is 0, the function does nothing and
40 This function returns 0 if it succeeds, or one of the following
43 :macro:`nghttp2_error.NGHTTP2_ERR_FLOW_CONTROL`
44 The local window size overflow or gets negative.
45 :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`