Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2013-11-28 23:42:58 +09:00
parent 9bafafa1e3
commit 4176a23d95
6 changed files with 64 additions and 3 deletions

View File

@ -1626,6 +1626,23 @@ Functions
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_submit_response2(nghttp2_session *session, int32_t stream_id, const nghttp2_nv *nva, size_t nvlen, const nghttp2_data_provider *data_prd)
Just like `nghttp2_submit_response()`, but this function takes the
*nva*, which is an array of ``nghttp2_nv`` with *nvlen* elements,
as name/value pairs. This function is useful if name/value pairs
are not NULL-terminated strings.
This function returns 0 if it succeeds, or one of the following
negative error codes:
:macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
The *pri* is invalid; or the *nva* includes empty name or
name which contains invalid characters.
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_submit_headers(nghttp2_session *session, uint8_t flags, int32_t stream_id, int32_t pri, const char **nv, void *stream_user_data)

View File

@ -2094,6 +2094,24 @@ negative error codes:</p>
</dl>
</dd></dl>
<dl class="function">
<dt id="nghttp2_submit_response2">
int <tt class="descname">nghttp2_submit_response2</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;*session</em>, int32_t<em>&nbsp;stream_id</em>, const <a class="reference internal" href="#nghttp2_nv" title="nghttp2_nv">nghttp2_nv</a><em>&nbsp;*nva</em>, size_t<em>&nbsp;nvlen</em>, const <a class="reference internal" href="#nghttp2_data_provider" title="nghttp2_data_provider">nghttp2_data_provider</a><em>&nbsp;*data_prd</em><big>)</big><a class="headerlink" href="#nghttp2_submit_response2" title="Permalink to this definition"></a></dt>
<dd><p>Just like <a class="reference internal" href="#nghttp2_submit_response" title="nghttp2_submit_response"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_response()</span></tt></a>, but this function takes the
<em>nva</em>, which is an array of <tt class="docutils literal"><span class="pre">nghttp2_nv</span></tt> with <em>nvlen</em> elements,
as name/value pairs. This function is useful if name/value pairs
are not NULL-terminated strings.</p>
<p>This function returns 0 if it succeeds, or one of the following
negative error codes:</p>
<dl class="docutils">
<dt><a class="reference internal" href="#NGHTTP2_ERR_INVALID_ARGUMENT" title="NGHTTP2_ERR_INVALID_ARGUMENT"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_INVALID_ARGUMENT</span></tt></a></dt>
<dd>The <em>pri</em> is invalid; or the <em>nva</em> includes empty name or
name which contains invalid characters.</dd>
<dt><a class="reference internal" href="#NGHTTP2_ERR_NOMEM" title="NGHTTP2_ERR_NOMEM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_NOMEM</span></tt></a></dt>
<dd>Out of memory.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="nghttp2_submit_headers">
int <tt class="descname">nghttp2_submit_headers</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;*session</em>, uint8_t<em>&nbsp;flags</em>, int32_t<em>&nbsp;stream_id</em>, int32_t<em>&nbsp;pri</em>, const char<em>&nbsp;**nv</em>, void<em>&nbsp;*stream_user_data</em><big>)</big><a class="headerlink" href="#nghttp2_submit_headers" title="Permalink to this definition"></a></dt>

View File

@ -520,12 +520,12 @@
<dt><a href="apiref.html#nghttp2_on_frame_not_send_callback">nghttp2_on_frame_not_send_callback (C type)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="apiref.html#nghttp2_on_frame_recv_callback">nghttp2_on_frame_recv_callback (C type)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="apiref.html#nghttp2_on_frame_recv_parse_error_callback">nghttp2_on_frame_recv_parse_error_callback (C type)</a>
</dt>
@ -943,6 +943,10 @@
</dt>
<dt><a href="apiref.html#nghttp2_submit_response2">nghttp2_submit_response2 (C function)</a>
</dt>
<dt><a href="apiref.html#nghttp2_submit_rst_stream">nghttp2_submit_rst_stream (C function)</a>
</dt>

View File

@ -1932,6 +1932,28 @@
<span class="kt">int32_t</span> <span class="n">stream_id</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">**</span><span class="n">nv</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_data_provider</span> <span class="o">*</span><span class="n">data_prd</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Just like `nghttp2_submit_response()`, but this function takes the</span>
<span class="cm"> * |nva|, which is an array of ``nghttp2_nv`` with |nvlen| elements,</span>
<span class="cm"> * as name/value pairs. This function is useful if name/value pairs</span>
<span class="cm"> * are not NULL-terminated strings.</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 |pri| is invalid; or the |nva| includes empty name or</span>
<span class="cm"> * name which contains invalid characters.</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_response2</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="k">const</span> <span class="n">nghttp2_nv</span> <span class="o">*</span><span class="n">nva</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">nvlen</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_data_provider</span> <span class="o">*</span><span class="n">data_prd</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>

Binary file not shown.

File diff suppressed because one or more lines are too long