Imported Upstream version 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_session_consume_stream.rst
1
2 nghttp2_session_consume_stream
3 ==============================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_session_consume_stream(nghttp2_session *session, int32_t stream_id, size_t size)
11
12     
13     Like `nghttp2_session_consume()`, but this only tells library that
14     *size* bytes were consumed only for stream denoted by *stream_id*.
15     Note that HTTP/2 maintains connection and stream level flow control
16     windows independently.
17     
18     This function returns 0 if it succeeds, or one of the following
19     negative error codes:
20     
21     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
22         Out of memory.
23     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
24         The *stream_id* is 0.
25     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`
26         Automatic WINDOW_UPDATE is not disabled.