Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_session_set_stream_user_data.rst
1
2 nghttp2_session_set_stream_user_data
3 ====================================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_session_set_stream_user_data(nghttp2_session *session, int32_t stream_id, void *stream_user_data)
11
12     
13     Sets the *stream_user_data* to the stream denoted by the
14     *stream_id*.  If a stream user data is already set to the stream,
15     it is replaced with the *stream_user_data*.  It is valid to specify
16     ``NULL`` in the *stream_user_data*, which nullifies the associated
17     data pointer.
18     
19     It is valid to set the *stream_user_data* to the stream reserved by
20     PUSH_PROMISE frame.
21     
22     This function returns 0 if it succeeds, or one of following
23     negative error codes:
24     
25     :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
26         The stream does not exist