Apply PIE to nghttpx
[platform/upstream/nghttp2.git] / doc / nghttp2_session_change_stream_priority.rst
1
2 nghttp2_session_change_stream_priority
3 ======================================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_session_change_stream_priority(nghttp2_session *session, int32_t stream_id, const nghttp2_priority_spec *pri_spec)
11
12     
13     Changes priority of existing stream denoted by *stream_id*.  The
14     new priority specification is *pri_spec*.
15     
16     The priority is changed silently and instantly, and no PRIORITY
17     frame will be sent to notify the peer of this change.  This
18     function may be useful for server to change the priority of pushed
19     stream.
20     
21     If *session* is initialized as server, and ``pri_spec->stream_id``
22     points to the idle stream, the idle stream is created if it does
23     not exist.  The created idle stream will depend on root stream
24     (stream 0) with weight 16.
25     
26     Otherwise, if stream denoted by ``pri_spec->stream_id`` is not
27     found, we use default priority instead of given *pri_spec*.  That
28     is make stream depend on root stream with weight 16.
29     
30     This function returns 0 if it succeeds, or one of the following
31     negative error codes:
32     
33     :macro:`NGHTTP2_ERR_NOMEM`
34         Out of memory.
35     :macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
36         Attempted to depend on itself; or no stream exist for the given
37         *stream_id*; or *stream_id* is 0