Commit a9a84531 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update doc

parent 72948e9c
......@@ -604,6 +604,9 @@ Types (structs, unions and typedefs)
.. member:: size_t nvlen
The number of name/value pairs in *nva*.
.. member:: nghttp2_headers_category cat
The category of this HEADERS frame.
.. member:: int32_t pri
The priority.
......@@ -1370,13 +1373,28 @@ Functions
Returns stream_user_data for the stream *stream_id*. The
stream_user_data is provided by `nghttp2_submit_request()` or
`nghttp2_submit_headers()`. If the stream is initiated by the
remote endpoint, stream_user_data is always ``NULL``. If the stream
is initiated by the local endpoint and ``NULL`` is given in
`nghttp2_submit_request()` or `nghttp2_submit_headers()`, then
this function returns ``NULL``. If the stream does not exist, this
function returns ``NULL``.
stream_user_data is provided by `nghttp2_submit_request()`,
`nghttp2_submit_headers()` or
`nghttp2_session_set_stream_user_data()`. Unless it is set using
`nghttp2_session_set_stream_user_data()`, if the stream is
initiated by the remote endpoint, stream_user_data is always
``NULL``. If the stream does not exist, this function returns
``NULL``.
.. function:: int nghttp2_session_set_stream_user_data(nghttp2_session *session, int32_t stream_id, void *stream_user_data)
Sets the *stream_user_data* to the stream denoted by the
*stream_id*. If a stream user data is already set to the stream, it
is replaced with the *stream_user_data*. It is valid to specify
``NULL`` in the *stream_user_data*, which nullifies the associated
data pointer.
This function returns 0 if it succeeds, or one of following
negative error codes:
:macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
The stream does not exist
.. function:: size_t nghttp2_session_get_outbound_queue_size(nghttp2_session *session)
......
......@@ -1004,6 +1004,12 @@ size_t <tt class="descname">nvlen</tt><a class="headerlink" href="#nghttp2_heade
<dd><p>The number of name/value pairs in <em>nva</em>.</p>
</dd></dl>
<dl class="member">
<dt id="nghttp2_headers.cat">
<a class="reference internal" href="#nghttp2_headers_category" title="nghttp2_headers_category">nghttp2_headers_category</a> <tt class="descname">cat</tt><a class="headerlink" href="#nghttp2_headers.cat" title="Permalink to this definition"></a></dt>
<dd><p>The category of this HEADERS frame.</p>
</dd></dl>
<dl class="member">
<dt id="nghttp2_headers.pri">
int32_t <tt class="descname">pri</tt><a class="headerlink" href="#nghttp2_headers.pri" title="Permalink to this definition"></a></dt>
......@@ -1913,13 +1919,29 @@ drop the connection.</p>
<dt id="nghttp2_session_get_stream_user_data">
void* <tt class="descname">nghttp2_session_get_stream_user_data</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><big>)</big><a class="headerlink" href="#nghttp2_session_get_stream_user_data" title="Permalink to this definition"></a></dt>
<dd><p>Returns stream_user_data for the stream <em>stream_id</em>. The
stream_user_data is provided by <a class="reference internal" href="#nghttp2_submit_request" title="nghttp2_submit_request"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_request()</span></tt></a> or
<a class="reference internal" href="#nghttp2_submit_headers" title="nghttp2_submit_headers"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_headers()</span></tt></a>. If the stream is initiated by the
remote endpoint, stream_user_data is always <tt class="docutils literal"><span class="pre">NULL</span></tt>. If the stream
is initiated by the local endpoint and <tt class="docutils literal"><span class="pre">NULL</span></tt> is given in
<a class="reference internal" href="#nghttp2_submit_request" title="nghttp2_submit_request"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_request()</span></tt></a> or <a class="reference internal" href="#nghttp2_submit_headers" title="nghttp2_submit_headers"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_headers()</span></tt></a>, then
this function returns <tt class="docutils literal"><span class="pre">NULL</span></tt>. If the stream does not exist, this
function returns <tt class="docutils literal"><span class="pre">NULL</span></tt>.</p>
stream_user_data is provided by <a class="reference internal" href="#nghttp2_submit_request" title="nghttp2_submit_request"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_request()</span></tt></a>,
<a class="reference internal" href="#nghttp2_submit_headers" title="nghttp2_submit_headers"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_headers()</span></tt></a> or
<a class="reference internal" href="#nghttp2_session_set_stream_user_data" title="nghttp2_session_set_stream_user_data"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_set_stream_user_data()</span></tt></a>. Unless it is set using
<a class="reference internal" href="#nghttp2_session_set_stream_user_data" title="nghttp2_session_set_stream_user_data"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_set_stream_user_data()</span></tt></a>, if the stream is
initiated by the remote endpoint, stream_user_data is always
<tt class="docutils literal"><span class="pre">NULL</span></tt>. If the stream does not exist, this function returns
<tt class="docutils literal"><span class="pre">NULL</span></tt>.</p>
</dd></dl>
<dl class="function">
<dt id="nghttp2_session_set_stream_user_data">
int <tt class="descname">nghttp2_session_set_stream_user_data</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>, void<em>&nbsp;*stream_user_data</em><big>)</big><a class="headerlink" href="#nghttp2_session_set_stream_user_data" title="Permalink to this definition"></a></dt>
<dd><p>Sets the <em>stream_user_data</em> to the stream denoted by the
<em>stream_id</em>. If a stream user data is already set to the stream, it
is replaced with the <em>stream_user_data</em>. It is valid to specify
<tt class="docutils literal"><span class="pre">NULL</span></tt> in the <em>stream_user_data</em>, which nullifies the associated
data pointer.</p>
<p>This function returns 0 if it succeeds, or one of 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 stream does not exist</dd>
</dl>
</dd></dl>
<dl class="function">
......
......@@ -490,6 +490,10 @@
</dt>
<dt><a href="apiref.html#nghttp2_headers.cat">nghttp2_headers.cat (C member)</a>
</dt>
<dt><a href="apiref.html#nghttp2_headers.hd">nghttp2_headers.hd (C member)</a>
</dt>
......@@ -900,6 +904,10 @@
</dt>
<dt><a href="apiref.html#nghttp2_session_set_stream_user_data">nghttp2_session_set_stream_user_data (C function)</a>
</dt>
<dt><a href="apiref.html#nghttp2_session_upgrade">nghttp2_session_upgrade (C function)</a>
</dt>
......
......@@ -754,10 +754,13 @@
<span class="cm"> */</span>
<span class="kt">size_t</span> <span class="n">nvlen</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * The category of this HEADERS frame.</span>
<span class="cm"> */</span>
<span class="n">nghttp2_headers_category</span> <span class="n">cat</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * The priority.</span>
<span class="cm"> */</span>
<span class="kt">int32_t</span> <span class="n">pri</span><span class="p">;</span>
<span class="n">nghttp2_headers_category</span> <span class="n">cat</span><span class="p">;</span>
<span class="p">}</span> <span class="n">nghttp2_headers</span><span class="p">;</span>
<span class="cm">/**</span>
......@@ -1703,17 +1706,36 @@
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Returns stream_user_data for the stream |stream_id|. The</span>
<span class="cm"> * stream_user_data is provided by `nghttp2_submit_request()` or</span>
<span class="cm"> * `nghttp2_submit_headers()`. If the stream is initiated by the</span>
<span class="cm"> * remote endpoint, stream_user_data is always ``NULL``. If the stream</span>
<span class="cm"> * is initiated by the local endpoint and ``NULL`` is given in</span>
<span class="cm"> * `nghttp2_submit_request()` or `nghttp2_submit_headers()`, then</span>
<span class="cm"> * this function returns ``NULL``. If the stream does not exist, this</span>
<span class="cm"> * function returns ``NULL``.</span>
<span class="cm"> * stream_user_data is provided by `nghttp2_submit_request()`,</span>
<span class="cm"> * `nghttp2_submit_headers()` or</span>
<span class="cm"> * `nghttp2_session_set_stream_user_data()`. Unless it is set using</span>
<span class="cm"> * `nghttp2_session_set_stream_user_data()`, if the stream is</span>
<span class="cm"> * initiated by the remote endpoint, stream_user_data is always</span>
<span class="cm"> * ``NULL``. If the stream does not exist, this function returns</span>
<span class="cm"> * ``NULL``.</span>
<span class="cm"> */</span>
<span class="kt">void</span><span class="o">*</span> <span class="nf">nghttp2_session_get_stream_user_data</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="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Sets the |stream_user_data| to the stream denoted by the</span>
<span class="cm"> * |stream_id|. If a stream user data is already set to the stream, it</span>
<span class="cm"> * is replaced with the |stream_user_data|. It is valid to specify</span>
<span class="cm"> * ``NULL`` in the |stream_user_data|, which nullifies the associated</span>
<span class="cm"> * data pointer.</span>
<span class="cm"> *</span>
<span class="cm"> * This function returns 0 if it succeeds, or one of 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 stream does not exist</span>
<span class="cm"> */</span>
<span class="kt">int</span> <span class="nf">nghttp2_session_set_stream_user_data</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">void</span> <span class="o">*</span><span class="n">stream_user_data</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
......
No preview for this file type
......@@ -663,8 +663,8 @@ bytes). The <tt class="docutils literal"><span class="pre">index</span></tt> cor
The <tt class="docutils literal"><span class="pre">name</span></tt> is the header field name and the <tt class="docutils literal"><span class="pre">value</span></tt> is the
header field value. They may be displayed as <tt class="docutils literal"><span class="pre">**DEALLOCATED**</span></tt>,
which means that the memory for that string is freed and not
available. This will happen when the value has 0 length or
specifying smaller value in <tt class="docutils literal"><span class="pre">-S</span></tt> than <tt class="docutils literal"><span class="pre">-s</span></tt>.</dd>
available. This will happen when the specifying smaller value in
<tt class="docutils literal"><span class="pre">-S</span></tt> than <tt class="docutils literal"><span class="pre">-s</span></tt>.</dd>
<dt>size</dt>
<dd>The sum of the spaces entries occupied, this includes the
entry overhead.</dd>
......
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