2 nghttp2_session_consume
3 =======================
8 *#include <nghttp2/nghttp2.h>*
10 .. function:: int nghttp2_session_consume(nghttp2_session *session, int32_t stream_id, size_t size)
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()`).
23 This function returns 0 if it succeeds, or one of the following
26 :macro:`NGHTTP2_ERR_NOMEM`
28 :macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
30 :macro:`NGHTTP2_ERR_INVALID_STATE`
31 Automatic WINDOW_UPDATE is not disabled.