Commit f0dfd69d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update doc

parent 649e326c
......@@ -1594,12 +1594,15 @@ Functions
:macro:`NGHTTP2_ERR_STREAM_CLOSED`
The stream is already closed or does not exist.
.. function:: int nghttp2_submit_priority(nghttp2_session *session, int32_t stream_id, int32_t pri)
.. function:: int nghttp2_submit_priority(nghttp2_session *session, uint8_t flags, int32_t stream_id, int32_t pri)
Submits PRIORITY frame to change the priority of stream *stream_id*
to the priority value *pri*.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
This function returns 0 if it succeeds, or one of the following
negative error codes:
......@@ -1610,25 +1613,31 @@ Functions
:macro:`NGHTTP2_ERR_STREAM_CLOSED`
The stream is already closed or does not exist.
.. function:: int nghttp2_submit_rst_stream(nghttp2_session *session, int32_t stream_id, nghttp2_error_code error_code)
.. function:: int nghttp2_submit_rst_stream(nghttp2_session *session, uint8_t flags, int32_t stream_id, nghttp2_error_code error_code)
Submits RST_STREAM frame to cancel/reject the stream *stream_id*
with the error code *error_code*.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
This function returns 0 if it succeeds, or one of the following
negative error codes:
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_submit_settings(nghttp2_session *session, const nghttp2_settings_entry *iv, size_t niv)
.. function:: int nghttp2_submit_settings(nghttp2_session *session, uint8_t flags, const nghttp2_settings_entry *iv, size_t niv)
Stores local settings and submits SETTINGS frame. The *iv* is the
pointer to the array of :type:`nghttp2_settings_entry`. The *niv*
indicates the number of :type:`nghttp2_settings_entry`.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
This function does not take ownership of the *iv*. This function
copies all the elements in the *iv*.
......@@ -1683,13 +1692,16 @@ Functions
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_submit_ping(nghttp2_session *session, uint8_t *opaque_data)
.. function:: int nghttp2_submit_ping(nghttp2_session *session, uint8_t flags, uint8_t *opaque_data)
Submits PING frame. You don't have to send PING back when you
received PING frame. The library automatically submits PING frame
in this case.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
If the *opaque_data* is non ``NULL``, then it should point to the 8
bytes array of memory to specify opaque data to send with PING
frame. If the *opaque_data* is ``NULL``, zero-cleared 8 bytes will
......@@ -1701,11 +1713,14 @@ Functions
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_submit_goaway(nghttp2_session *session, nghttp2_error_code error_code, uint8_t *opaque_data, size_t opaque_data_len)
.. function:: int nghttp2_submit_goaway(nghttp2_session *session, uint8_t flags, nghttp2_error_code error_code, uint8_t *opaque_data, size_t opaque_data_len)
Submits GOAWAY frame with the error code *error_code*.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
If the *opaque_data* is not ``NULL`` and *opaque_data_len* is not
zero, those data will be sent as additional debug data. The
library makes a copy of the memory region pointed by *opaque_data*
......@@ -1724,7 +1739,8 @@ Functions
Submits WINDOW_UPDATE frame.
The *flags* is currently ignored.
The *flags* is currently ignored and should be
:macro:`NGHTTP2_FLAG_NONE`.
If the *window_size_increment* is positive, the WINDOW_UPDATE with
that value as window_size_increment is queued. If the
......@@ -1740,11 +1756,12 @@ Functions
should be submitted, then WINDOW_UPDATE is queued with the current
received bytes count.
If the *window_size_increment* is 0, the function does nothing and
returns 0.
This function returns 0 if it succeeds, or one of the following
negative error codes:
:macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
The *delta_window_size* is 0.
:macro:`NGHTTP2_ERR_FLOW_CONTROL`
The local window size overflow or gets negative.
:macro:`NGHTTP2_ERR_STREAM_CLOSED`
......
This diff is collapsed.
......@@ -1887,6 +1887,9 @@
<span class="cm"> * Submits PRIORITY frame to change the priority of stream |stream_id|</span>
<span class="cm"> * to the priority value |pri|.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * This function returns 0 if it succeeds, or one of the following</span>
<span class="cm"> * negative error codes:</span>
<span class="cm"> *</span>
......@@ -1897,8 +1900,8 @@
<span class="cm"> * :enum:`NGHTTP2_ERR_STREAM_CLOSED`</span>
<span class="cm"> * The stream is already closed or does not exist.</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_priority</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">int32_t</span> <span class="n">stream_id</span><span class="p">,</span>
<span class="kt">int32_t</span> <span class="n">pri</span><span class="p">);</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_priority</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
<span class="kt">int32_t</span> <span class="n">stream_id</span><span class="p">,</span> <span class="kt">int32_t</span> <span class="n">pri</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
......@@ -1906,13 +1909,17 @@
<span class="cm"> * Submits RST_STREAM frame to cancel/reject the stream |stream_id|</span>
<span class="cm"> * with the error code |error_code|.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * This function returns 0 if it succeeds, or one of the following</span>
<span class="cm"> * negative error codes:</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_NOMEM`</span>
<span class="cm"> * Out of memory.</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_rst_stream</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">int32_t</span> <span class="n">stream_id</span><span class="p">,</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_rst_stream</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
<span class="kt">int32_t</span> <span class="n">stream_id</span><span class="p">,</span>
<span class="n">nghttp2_error_code</span> <span class="n">error_code</span><span class="p">);</span>
<span class="cm">/**</span>
......@@ -1922,6 +1929,9 @@
<span class="cm"> * pointer to the array of :type:`nghttp2_settings_entry`. The |niv|</span>
<span class="cm"> * indicates the number of :type:`nghttp2_settings_entry`.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * This function does not take ownership of the |iv|. This function</span>
<span class="cm"> * copies all the elements in the |iv|.</span>
<span class="cm"> *</span>
......@@ -1938,7 +1948,7 @@
<span class="cm"> * :enum:`NGHTTP2_ERR_NOMEM`</span>
<span class="cm"> * Out of memory.</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_settings</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_settings</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_settings_entry</span> <span class="o">*</span><span class="n">iv</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">niv</span><span class="p">);</span>
......@@ -1990,6 +2000,9 @@
<span class="cm"> * received PING frame. The library automatically submits PING frame</span>
<span class="cm"> * in this case.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * If the |opaque_data| is non ``NULL``, then it should point to the 8</span>
<span class="cm"> * bytes array of memory to specify opaque data to send with PING</span>
<span class="cm"> * frame. If the |opaque_data| is ``NULL``, zero-cleared 8 bytes will</span>
......@@ -2001,13 +2014,17 @@
<span class="cm"> * :enum:`NGHTTP2_ERR_NOMEM`</span>
<span class="cm"> * Out of memory.</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_ping</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="o">*</span><span class="n">opaque_data</span><span class="p">);</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_ping</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
<span class="kt">uint8_t</span> <span class="o">*</span><span class="n">opaque_data</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Submits GOAWAY frame with the error code |error_code|.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * If the |opaque_data| is not ``NULL`` and |opaque_data_len| is not</span>
<span class="cm"> * zero, those data will be sent as additional debug data. The</span>
<span class="cm"> * library makes a copy of the memory region pointed by |opaque_data|</span>
......@@ -2021,7 +2038,7 @@
<span class="cm"> * :enum:`NGHTTP2_ERR_NOMEM`</span>
<span class="cm"> * Out of memory.</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_goaway</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span>
<span class="kt">int</span> <span class="nf">nghttp2_submit_goaway</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span> <span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
<span class="n">nghttp2_error_code</span> <span class="n">error_code</span><span class="p">,</span>
<span class="kt">uint8_t</span> <span class="o">*</span><span class="n">opaque_data</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">opaque_data_len</span><span class="p">);</span>
......@@ -2030,7 +2047,8 @@
<span class="cm"> *</span>
<span class="cm"> * Submits WINDOW_UPDATE frame.</span>
<span class="cm"> *</span>
<span class="cm"> * The |flags| is currently ignored.</span>
<span class="cm"> * The |flags| is currently ignored and should be</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_NONE`.</span>
<span class="cm"> *</span>
<span class="cm"> * If the |window_size_increment| is positive, the WINDOW_UPDATE with</span>
<span class="cm"> * that value as window_size_increment is queued. If the</span>
......@@ -2046,11 +2064,12 @@
<span class="cm"> * should be submitted, then WINDOW_UPDATE is queued with the current</span>
<span class="cm"> * received bytes count.</span>
<span class="cm"> *</span>
<span class="cm"> * If the |window_size_increment| is 0, the function does nothing and</span>
<span class="cm"> * returns 0.</span>
<span class="cm"> *</span>
<span class="cm"> * This function returns 0 if it succeeds, or one of the following</span>
<span class="cm"> * negative error codes:</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_INVALID_ARGUMENT`</span>
<span class="cm"> * The |delta_window_size| is 0.</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_FLOW_CONTROL`</span>
<span class="cm"> * The local window size overflow or gets negative.</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_STREAM_CLOSED`</span>
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment