1
2nghttp2_session_consume
3=======================
4
5Synopsis
6--------
7
8*#include <nghttp2/nghttp2.h>*
9
10.. function:: int nghttp2_session_consume(nghttp2_session *session, int32_t stream_id, size_t size)
11
12
13    Tells the *session* that *size* bytes for a stream denoted by
14    *stream_id* were consumed by application and are ready to
15    WINDOW_UPDATE.  The consumed bytes are counted towards both
16    connection and stream level WINDOW_UPDATE (see
17    `nghttp2_session_consume_connection()` and
18    `nghttp2_session_consume_stream()` to update consumption
19    independently).  This function is intended to be used without
20    automatic window update (see
21    `nghttp2_option_set_no_auto_window_update()`).
22
23    This function returns 0 if it succeeds, or one of the following
24    negative error codes:
25
26    :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
27        Out of memory.
28    :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
29        The *stream_id* is 0.
30    :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`
31        Automatic WINDOW_UPDATE is not disabled.
32