Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-21 21:31:00 +09:00
parent 17577f6581
commit cd3337aed2
6 changed files with 27 additions and 36 deletions

View File

@ -600,13 +600,6 @@ The END_HEADERS flag.</p>
The PRIORITY flag.</p> The PRIORITY flag.</p>
</dd></dl> </dd></dl>
<dl class="macro">
<dt id="NGHTTP2_FLAG_END_PUSH_PROMISE">
<tt class="descname">NGHTTP2_FLAG_END_PUSH_PROMISE</tt><a class="headerlink" href="#NGHTTP2_FLAG_END_PUSH_PROMISE" title="Permalink to this definition"></a></dt>
<dd><p>(<tt class="docutils literal"><span class="pre">0x4</span></tt>)
The END_PUSH_PROMISE flag.</p>
</dd></dl>
<dl class="macro"> <dl class="macro">
<dt id="NGHTTP2_FLAG_ACK"> <dt id="NGHTTP2_FLAG_ACK">
<tt class="descname">NGHTTP2_FLAG_ACK</tt><a class="headerlink" href="#NGHTTP2_FLAG_ACK" title="Permalink to this definition"></a></dt> <tt class="descname">NGHTTP2_FLAG_ACK</tt><a class="headerlink" href="#NGHTTP2_FLAG_ACK" title="Permalink to this definition"></a></dt>
@ -2294,14 +2287,13 @@ int <tt class="descname">nghttp2_submit_headers</tt><big>(</big><a class="refere
following values:</p> following values:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="#NGHTTP2_FLAG_END_STREAM" title="NGHTTP2_FLAG_END_STREAM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_STREAM</span></tt></a></li> <li><a class="reference internal" href="#NGHTTP2_FLAG_END_STREAM" title="NGHTTP2_FLAG_END_STREAM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_STREAM</span></tt></a></li>
<li><a class="reference internal" href="#NGHTTP2_FLAG_END_HEADERS" title="NGHTTP2_FLAG_END_HEADERS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_HEADERS</span></tt></a></li>
<li><a class="reference internal" href="#NGHTTP2_FLAG_PRIORITY" title="NGHTTP2_FLAG_PRIORITY"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_PRIORITY</span></tt></a></li> <li><a class="reference internal" href="#NGHTTP2_FLAG_PRIORITY" title="NGHTTP2_FLAG_PRIORITY"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_PRIORITY</span></tt></a></li>
</ul> </ul>
<p>If <em>flags</em> includes <a class="reference internal" href="#NGHTTP2_FLAG_END_STREAM" title="NGHTTP2_FLAG_END_STREAM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_STREAM</span></tt></a>, this frame has <p>If <em>flags</em> includes <a class="reference internal" href="#NGHTTP2_FLAG_END_STREAM" title="NGHTTP2_FLAG_END_STREAM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_STREAM</span></tt></a>, this frame has
END_STREAM flag set. The library does not support header END_STREAM flag set.</p>
continuation and the HEADERS frame always has <p>The library handles the CONTINUATION frame internally and it
<a class="reference internal" href="#NGHTTP2_FLAG_END_HEADERS" title="NGHTTP2_FLAG_END_HEADERS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_HEADERS</span></tt></a> flag set regardless of the <em>flags</em> correctly sets END_HEADERS to the last sequence of the PUSH_PROMISE
value.</p> or CONTINUATION frame.</p>
<p>If the <em>stream_id</em> is -1, this frame is assumed as request (i.e., <p>If the <em>stream_id</em> is -1, this frame is assumed as request (i.e.,
request HEADERS frame which opens new stream). In this case, the request HEADERS frame which opens new stream). In this case, the
actual stream ID is assigned just before the frame is sent. For actual stream ID is assigned just before the frame is sent. For
@ -2410,10 +2402,10 @@ strictly greater than (1 &lt;&lt; 31) - 1.</dd>
<dl class="function"> <dl class="function">
<dt id="nghttp2_submit_push_promise"> <dt id="nghttp2_submit_push_promise">
int <tt class="descname">nghttp2_submit_push_promise</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>, const <a class="reference internal" href="#nghttp2_nv" title="nghttp2_nv">nghttp2_nv</a><em>&nbsp;*nva</em>, size_t<em>&nbsp;nvlen</em><big>)</big><a class="headerlink" href="#nghttp2_submit_push_promise" title="Permalink to this definition"></a></dt> int <tt class="descname">nghttp2_submit_push_promise</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>, const <a class="reference internal" href="#nghttp2_nv" title="nghttp2_nv">nghttp2_nv</a><em>&nbsp;*nva</em>, size_t<em>&nbsp;nvlen</em><big>)</big><a class="headerlink" href="#nghttp2_submit_push_promise" title="Permalink to this definition"></a></dt>
<dd><p>Submits PUSH_PROMISE frame. The <em>flags</em> is currently ignored and <dd><p>Submits PUSH_PROMISE frame.</p>
the resulting PUSH_PROMISE frame always has <p>The <em>flags</em> is currently ignored. The library handles the
<a class="reference internal" href="#NGHTTP2_FLAG_END_PUSH_PROMISE" title="NGHTTP2_FLAG_END_PUSH_PROMISE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_FLAG_END_PUSH_PROMISE</span></tt></a> flag set due to the lack of CONTINUATION frame internally and it correctly sets END_HEADERS to
header continuation support in the library.</p> the last sequence of the PUSH_PROMISE or CONTINUATION frame.</p>
<p>The <em>stream_id</em> must be client initiated stream ID.</p> <p>The <em>stream_id</em> must be client initiated stream ID.</p>
<p>The <em>nva</em> is an array of name/value pair <a class="reference internal" href="#nghttp2_nv" title="nghttp2_nv"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_nv</span></tt></a> with <p>The <em>nva</em> is an array of name/value pair <a class="reference internal" href="#nghttp2_nv" title="nghttp2_nv"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_nv</span></tt></a> with
<em>nvlen</em> elements. The value is opaque sequence of bytes and <em>nvlen</em> elements. The value is opaque sequence of bytes and

View File

@ -377,10 +377,6 @@
</dt> </dt>
<dt><a href="apiref.html#NGHTTP2_FLAG_END_PUSH_PROMISE">NGHTTP2_FLAG_END_PUSH_PROMISE (C macro)</a>
</dt>
<dt><a href="apiref.html#NGHTTP2_FLAG_END_SEGMENT">NGHTTP2_FLAG_END_SEGMENT (C macro)</a> <dt><a href="apiref.html#NGHTTP2_FLAG_END_SEGMENT">NGHTTP2_FLAG_END_SEGMENT (C macro)</a>
</dt> </dt>

View File

@ -545,10 +545,6 @@
<span class="cm"> */</span> <span class="cm"> */</span>
<span class="n">NGHTTP2_FLAG_PRIORITY</span> <span class="o">=</span> <span class="mh">0x8</span><span class="p">,</span> <span class="n">NGHTTP2_FLAG_PRIORITY</span> <span class="o">=</span> <span class="mh">0x8</span><span class="p">,</span>
<span class="cm">/**</span> <span class="cm">/**</span>
<span class="cm"> * The END_PUSH_PROMISE flag.</span>
<span class="cm"> */</span>
<span class="n">NGHTTP2_FLAG_END_PUSH_PROMISE</span> <span class="o">=</span> <span class="mh">0x4</span><span class="p">,</span>
<span class="cm">/**</span>
<span class="cm"> * The ACK flag.</span> <span class="cm"> * The ACK flag.</span>
<span class="cm"> */</span> <span class="cm"> */</span>
<span class="n">NGHTTP2_FLAG_ACK</span> <span class="o">=</span> <span class="mh">0x1</span><span class="p">,</span> <span class="n">NGHTTP2_FLAG_ACK</span> <span class="o">=</span> <span class="mh">0x1</span><span class="p">,</span>
@ -2132,14 +2128,14 @@
<span class="cm"> * following values:</span> <span class="cm"> * following values:</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * * :enum:`NGHTTP2_FLAG_END_STREAM`</span> <span class="cm"> * * :enum:`NGHTTP2_FLAG_END_STREAM`</span>
<span class="cm"> * * :enum:`NGHTTP2_FLAG_END_HEADERS`</span>
<span class="cm"> * * :enum:`NGHTTP2_FLAG_PRIORITY`</span> <span class="cm"> * * :enum:`NGHTTP2_FLAG_PRIORITY`</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * If |flags| includes :enum:`NGHTTP2_FLAG_END_STREAM`, this frame has</span> <span class="cm"> * If |flags| includes :enum:`NGHTTP2_FLAG_END_STREAM`, this frame has</span>
<span class="cm"> * END_STREAM flag set. The library does not support header</span> <span class="cm"> * END_STREAM flag set.</span>
<span class="cm"> * continuation and the HEADERS frame always has</span> <span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_END_HEADERS` flag set regardless of the |flags|</span> <span class="cm"> * The library handles the CONTINUATION frame internally and it</span>
<span class="cm"> * value.</span> <span class="cm"> * correctly sets END_HEADERS to the last sequence of the PUSH_PROMISE</span>
<span class="cm"> * or CONTINUATION frame.</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * If the |stream_id| is -1, this frame is assumed as request (i.e.,</span> <span class="cm"> * If the |stream_id| is -1, this frame is assumed as request (i.e.,</span>
<span class="cm"> * request HEADERS frame which opens new stream). In this case, the</span> <span class="cm"> * request HEADERS frame which opens new stream). In this case, the</span>
@ -2276,10 +2272,11 @@
<span class="cm">/**</span> <span class="cm">/**</span>
<span class="cm"> * @function</span> <span class="cm"> * @function</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * Submits PUSH_PROMISE frame. The |flags| is currently ignored and</span> <span class="cm"> * Submits PUSH_PROMISE frame.</span>
<span class="cm"> * the resulting PUSH_PROMISE frame always has</span> <span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_FLAG_END_PUSH_PROMISE` flag set due to the lack of</span> <span class="cm"> * The |flags| is currently ignored. The library handles the</span>
<span class="cm"> * header continuation support in the library.</span> <span class="cm"> * CONTINUATION frame internally and it correctly sets END_HEADERS to</span>
<span class="cm"> * the last sequence of the PUSH_PROMISE or CONTINUATION frame.</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * The |stream_id| must be client initiated stream ID.</span> <span class="cm"> * The |stream_id| must be client initiated stream ID.</span>
<span class="cm"> *</span> <span class="cm"> *</span>

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -592,7 +592,7 @@ is emitted via <tt class="docutils literal"><span class="pre">on_header_callback
<span class="p">}</span> <span class="p">}</span>
<span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span>
<span class="n">frame</span><span class="o">-&gt;</span><span class="n">hd</span><span class="p">.</span><span class="n">stream_id</span><span class="p">);</span> <span class="n">frame</span><span class="o">-&gt;</span><span class="n">hd</span><span class="p">.</span><span class="n">stream_id</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="n">stream_data</span><span class="o">-&gt;</span><span class="n">request_path</span><span class="p">)</span> <span class="p">{</span> <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">stream_data</span> <span class="o">||</span> <span class="n">stream_data</span><span class="o">-&gt;</span><span class="n">request_path</span><span class="p">)</span> <span class="p">{</span>
<span class="k">break</span><span class="p">;</span> <span class="k">break</span><span class="p">;</span>
<span class="p">}</span> <span class="p">}</span>
<span class="k">if</span><span class="p">(</span><span class="n">namelen</span> <span class="o">==</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">PATH</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">&amp;&amp;</span> <span class="n">memcmp</span><span class="p">(</span><span class="n">PATH</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">namelen</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">if</span><span class="p">(</span><span class="n">namelen</span> <span class="o">==</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">PATH</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">&amp;&amp;</span> <span class="n">memcmp</span><span class="p">(</span><span class="n">PATH</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">namelen</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
@ -706,6 +706,9 @@ is about to close:</p>
<span class="n">http2_stream_data</span> <span class="o">*</span><span class="n">stream_data</span><span class="p">;</span> <span class="n">http2_stream_data</span> <span class="o">*</span><span class="n">stream_data</span><span class="p">;</span>
<span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_id</span><span class="p">);</span> <span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_id</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">stream_data</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">remove_stream</span><span class="p">(</span><span class="n">session_data</span><span class="p">,</span> <span class="n">stream_data</span><span class="p">);</span> <span class="n">remove_stream</span><span class="p">(</span><span class="n">session_data</span><span class="p">,</span> <span class="n">stream_data</span><span class="p">);</span>
<span class="n">delete_http2_stream_data</span><span class="p">(</span><span class="n">stream_data</span><span class="p">);</span> <span class="n">delete_http2_stream_data</span><span class="p">(</span><span class="n">stream_data</span><span class="p">);</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
@ -1128,7 +1131,7 @@ stream is about to close and we no longer use that object.</p>
<span class="p">}</span> <span class="p">}</span>
<span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span>
<span class="n">frame</span><span class="o">-&gt;</span><span class="n">hd</span><span class="p">.</span><span class="n">stream_id</span><span class="p">);</span> <span class="n">frame</span><span class="o">-&gt;</span><span class="n">hd</span><span class="p">.</span><span class="n">stream_id</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="n">stream_data</span><span class="o">-&gt;</span><span class="n">request_path</span><span class="p">)</span> <span class="p">{</span> <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">stream_data</span> <span class="o">||</span> <span class="n">stream_data</span><span class="o">-&gt;</span><span class="n">request_path</span><span class="p">)</span> <span class="p">{</span>
<span class="k">break</span><span class="p">;</span> <span class="k">break</span><span class="p">;</span>
<span class="p">}</span> <span class="p">}</span>
<span class="k">if</span><span class="p">(</span><span class="n">namelen</span> <span class="o">==</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">PATH</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">&amp;&amp;</span> <span class="n">memcmp</span><span class="p">(</span><span class="n">PATH</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">namelen</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">if</span><span class="p">(</span><span class="n">namelen</span> <span class="o">==</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">PATH</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">&amp;&amp;</span> <span class="n">memcmp</span><span class="p">(</span><span class="n">PATH</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">namelen</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
@ -1247,6 +1250,9 @@ stream is about to close and we no longer use that object.</p>
<span class="n">http2_stream_data</span> <span class="o">*</span><span class="n">stream_data</span><span class="p">;</span> <span class="n">http2_stream_data</span> <span class="o">*</span><span class="n">stream_data</span><span class="p">;</span>
<span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_id</span><span class="p">);</span> <span class="n">stream_data</span> <span class="o">=</span> <span class="n">nghttp2_session_get_stream_user_data</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">stream_id</span><span class="p">);</span>
<span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">stream_data</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">remove_stream</span><span class="p">(</span><span class="n">session_data</span><span class="p">,</span> <span class="n">stream_data</span><span class="p">);</span> <span class="n">remove_stream</span><span class="p">(</span><span class="n">session_data</span><span class="p">,</span> <span class="n">stream_data</span><span class="p">);</span>
<span class="n">delete_http2_stream_data</span><span class="p">(</span><span class="n">stream_data</span><span class="p">);</span> <span class="n">delete_http2_stream_data</span><span class="p">(</span><span class="n">stream_data</span><span class="p">);</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>