Imported Upstream version 1.0.0
[platform/upstream/nghttp2.git] / doc / nghttp2_submit_rst_stream.rst
1
2 nghttp2_submit_rst_stream
3 =========================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_submit_rst_stream(nghttp2_session *session, uint8_t flags, int32_t stream_id, uint32_t error_code)
11
12     
13     Submits RST_STREAM frame to cancel/reject the stream *stream_id*
14     with the error code *error_code*.
15     
16     The pre-defined error code is one of :macro:`nghttp2_error_code`.
17     
18     The *flags* is currently ignored and should be
19     :macro:`NGHTTP2_FLAG_NONE`.
20     
21     This function returns 0 if it succeeds, or one of the following
22     negative error codes:
23     
24     :macro:`NGHTTP2_ERR_NOMEM`
25         Out of memory.
26     :macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
27         The *stream_id* is 0.