Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2013-11-08 00:22:38 +09:00
parent 5b57292b43
commit c056713c5a
6 changed files with 256 additions and 136 deletions

View File

@ -439,19 +439,23 @@ Enums
(``1``)
This option prevents the library from sending WINDOW_UPDATE for a
stream automatically. If this option is set, the application is
responsible for sending WINDOW_UPDATE using
`nghttp2_submit_window_update`.
stream automatically. If this option is set to nonzero, the
library won't send WINDOW_UPDATE for a stream and the application
is responsible for sending WINDOW_UPDATE using
`nghttp2_submit_window_update`. By default, this option is set to
zero.
.. macro:: NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE
(``2``)
(``1 << 1``)
This option prevents the library from sending WINDOW_UPDATE for a
connection automatically. If this option is set, the application
is responsible for sending WINDOW_UPDATE with stream ID 0 using
`nghttp2_submit_window_update`.
connection automatically. If this option is set to nonzero, the
library won't send WINDOW_UPDATE for a connection and the
application is responsible for sending WINDOW_UPDATE with stream
ID 0 using `nghttp2_submit_window_update`. By default, this
option is set to zero.
.. macro:: NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS
(``3``)
(``1 << 2``)
This option sets the SETTINGS_MAX_CONCURRENT_STREAMS value of
remote endpoint as if it is received in SETTINGS frame. Without
specifying this option, before the local endpoint receives
@ -1052,6 +1056,22 @@ Types (structs, unions and typedefs)
unknown.
.. type:: nghttp2_opt_set
Struct to store option values for nghttp2_session.
.. member:: uint8_t no_auto_stream_window_update
:macro:`NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE`
.. member:: uint8_t no_auto_connection_window_update
:macro:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE`
.. member:: uint32_t peer_max_concurrent_streams
:macro:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS`
.. type:: nghttp2_gzip
@ -1101,48 +1121,54 @@ Functions
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: int nghttp2_session_client_new2(nghttp2_session **session_ptr, const nghttp2_session_callbacks *callbacks, void *user_data, uint32_t opt_set_mask, const nghttp2_opt_set *opt_set)
Like `nghttp2_session_client_new()`, but with additional options
specified in the *opt_set*. The caller must set bitwise-OR of
:macro:`nghttp2_opt` for given options. For example, if it
specifies :macro:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE` and
:macro:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS` in the *opt_set*,
the *opt_set_mask* should be
``NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE |
NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS``.
If the *opt_set_mask* is 0, the *opt_set* could be ``NULL`` safely
and the call is equivalent to `nghttp2_session_client_new()`.
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_session_server_new2(nghttp2_session **session_ptr, const nghttp2_session_callbacks *callbacks, void *user_data, uint32_t opt_set_mask, const nghttp2_opt_set *opt_set)
Like `nghttp2_session_server_new()`, but with additional options
specified in the *opt_set*. The caller must set bitwise-OR of
:macro:`nghttp2_opt` for given options. For example, if it
specifies :macro:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE` and
:macro:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS` in the *opt_set*,
the *opt_set_mask* should be
``NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE |
NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS``.
If the *opt_set_mask* is 0, the *opt_set* could be ``NULL`` safely
and the call is equivalent to `nghttp2_session_server_new()`.
This function returns 0 if it succeeds, or one of the following
negative error codes:
:macro:`NGHTTP2_ERR_NOMEM`
Out of memory.
.. function:: void nghttp2_session_del(nghttp2_session *session)
Frees any resources allocated for *session*. If *session* is
``NULL``, this function does nothing.
.. function:: int nghttp2_session_set_option(nghttp2_session *session, int optname, void *optval, size_t optlen)
Sets the configuration option for the *session*. The *optname* is
one of :type:`nghttp2_opt`. The *optval* is the pointer to the
option value and the *optlen* is the size of *\*optval*. The
required type of *optval* varies depending on the *optname*. See
below.
The following *optname* are supported:
:macro:`NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE`
The *optval* must be a pointer to ``int``. If the *\*optval* is
nonzero, the library will not send WINDOW_UPDATE for a stream
automatically. Therefore, the application is responsible for
sending WINDOW_UPDATE using
`nghttp2_submit_window_update`. This option defaults to 0.
:macro:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE`
The *optval* must be a pointer to ``int``. If the *\*optval* is
nonzero, the library will not send WINDOW_UPDATE for connection
automatically. Therefore, the application is responsible for
sending WINDOW_UPDATE using
`nghttp2_submit_window_update`. This option defaults to 0.
:macro:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS`
The *optval* must be a pointer to ``ssize_t``. It is an error
if *\*optval* is 0 or negative.
This function returns 0 if it succeeds, or one of the following
negative error codes:
:macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
The *optname* is not supported; or the *optval* and/or the
*optlen* are invalid.
.. function:: int nghttp2_session_send(nghttp2_session *session)

View File

@ -705,25 +705,29 @@ which is analogous to HEADERS in SPDY.</p>
<tt class="descname">NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE</tt><a class="headerlink" href="#NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE" title="Permalink to this definition"></a></dt>
<dd><p>(<tt class="docutils literal"><span class="pre">1</span></tt>)
This option prevents the library from sending WINDOW_UPDATE for a
stream automatically. If this option is set, the application is
responsible for sending WINDOW_UPDATE using
<a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>.</p>
stream automatically. If this option is set to nonzero, the
library won&#8217;t send WINDOW_UPDATE for a stream and the application
is responsible for sending WINDOW_UPDATE using
<a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>. By default, this option is set to
zero.</p>
</dd></dl>
<dl class="macro">
<dt id="NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE">
<tt class="descname">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</tt><a class="headerlink" href="#NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE" title="Permalink to this definition"></a></dt>
<dd><p>(<tt class="docutils literal"><span class="pre">2</span></tt>)
<dd><p>(<tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;&lt;</span> <span class="pre">1</span></tt>)
This option prevents the library from sending WINDOW_UPDATE for a
connection automatically. If this option is set, the application
is responsible for sending WINDOW_UPDATE with stream ID 0 using
<a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>.</p>
connection automatically. If this option is set to nonzero, the
library won&#8217;t send WINDOW_UPDATE for a connection and the
application is responsible for sending WINDOW_UPDATE with stream
ID 0 using <a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>. By default, this
option is set to zero.</p>
</dd></dl>
<dl class="macro">
<dt id="NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS">
<tt class="descname">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</tt><a class="headerlink" href="#NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS" title="Permalink to this definition"></a></dt>
<dd><p>(<tt class="docutils literal"><span class="pre">3</span></tt>)
<dd><p>(<tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;&lt;</span> <span class="pre">2</span></tt>)
This option sets the SETTINGS_MAX_CONCURRENT_STREAMS value of
remote endpoint as if it is received in SETTINGS frame. Without
specifying this option, before the local endpoint receives
@ -1514,6 +1518,30 @@ unknown.</p>
</dd></dl>
<dl class="type">
<dt id="nghttp2_opt_set">
<tt class="descname">nghttp2_opt_set</tt><a class="headerlink" href="#nghttp2_opt_set" title="Permalink to this definition"></a></dt>
<dd><p>Struct to store option values for nghttp2_session.</p>
<dl class="member">
<dt id="nghttp2_opt_set.no_auto_stream_window_update">
uint8_t <tt class="descname">no_auto_stream_window_update</tt><a class="headerlink" href="#nghttp2_opt_set.no_auto_stream_window_update" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE</span></tt></a></p>
</dd></dl>
<dl class="member">
<dt id="nghttp2_opt_set.no_auto_connection_window_update">
uint8_t <tt class="descname">no_auto_connection_window_update</tt><a class="headerlink" href="#nghttp2_opt_set.no_auto_connection_window_update" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span></tt></a></p>
</dd></dl>
<dl class="member">
<dt id="nghttp2_opt_set.peer_max_concurrent_streams">
uint32_t <tt class="descname">peer_max_concurrent_streams</tt><a class="headerlink" href="#nghttp2_opt_set.peer_max_concurrent_streams" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="#NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS" title="NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt></a></p>
</dd></dl>
</dd></dl>
<dl class="type">
<dt id="nghttp2_gzip">
<tt class="descname">nghttp2_gzip</tt><a class="headerlink" href="#nghttp2_gzip" title="Permalink to this definition"></a></dt>
@ -1562,6 +1590,48 @@ negative error codes:</p>
</dl>
</dd></dl>
<dl class="function">
<dt id="nghttp2_session_client_new2">
int <tt class="descname">nghttp2_session_client_new2</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;**session_ptr</em>, const <a class="reference internal" href="#nghttp2_session_callbacks" title="nghttp2_session_callbacks">nghttp2_session_callbacks</a><em>&nbsp;*callbacks</em>, void<em>&nbsp;*user_data</em>, uint32_t<em>&nbsp;opt_set_mask</em>, const <a class="reference internal" href="#nghttp2_opt_set" title="nghttp2_opt_set">nghttp2_opt_set</a><em>&nbsp;*opt_set</em><big>)</big><a class="headerlink" href="#nghttp2_session_client_new2" title="Permalink to this definition"></a></dt>
<dd><p>Like <a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a>, but with additional options
specified in the <em>opt_set</em>. The caller must set bitwise-OR of
<a class="reference internal" href="#nghttp2_opt" title="nghttp2_opt"><tt class="xref c c-macro docutils literal"><span class="pre">nghttp2_opt</span></tt></a> for given options. For example, if it
specifies <a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span></tt></a> and
<a class="reference internal" href="#NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS" title="NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt></a> in the <em>opt_set</em>,
the <em>opt_set_mask</em> should be
<tt class="docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span> <span class="pre">|</span>
<span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt>.</p>
<p>If the <em>opt_set_mask</em> is 0, the <em>opt_set</em> could be <tt class="docutils literal"><span class="pre">NULL</span></tt> safely
and the call is equivalent to <a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a>.</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_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_session_server_new2">
int <tt class="descname">nghttp2_session_server_new2</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;**session_ptr</em>, const <a class="reference internal" href="#nghttp2_session_callbacks" title="nghttp2_session_callbacks">nghttp2_session_callbacks</a><em>&nbsp;*callbacks</em>, void<em>&nbsp;*user_data</em>, uint32_t<em>&nbsp;opt_set_mask</em>, const <a class="reference internal" href="#nghttp2_opt_set" title="nghttp2_opt_set">nghttp2_opt_set</a><em>&nbsp;*opt_set</em><big>)</big><a class="headerlink" href="#nghttp2_session_server_new2" title="Permalink to this definition"></a></dt>
<dd><p>Like <a class="reference internal" href="#nghttp2_session_server_new" title="nghttp2_session_server_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_server_new()</span></tt></a>, but with additional options
specified in the <em>opt_set</em>. The caller must set bitwise-OR of
<a class="reference internal" href="#nghttp2_opt" title="nghttp2_opt"><tt class="xref c c-macro docutils literal"><span class="pre">nghttp2_opt</span></tt></a> for given options. For example, if it
specifies <a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span></tt></a> and
<a class="reference internal" href="#NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS" title="NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt></a> in the <em>opt_set</em>,
the <em>opt_set_mask</em> should be
<tt class="docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span> <span class="pre">|</span>
<span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt>.</p>
<p>If the <em>opt_set_mask</em> is 0, the <em>opt_set</em> could be <tt class="docutils literal"><span class="pre">NULL</span></tt> safely
and the call is equivalent to <a class="reference internal" href="#nghttp2_session_server_new" title="nghttp2_session_server_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_server_new()</span></tt></a>.</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_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_session_del">
void <tt class="descname">nghttp2_session_del</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;*session</em><big>)</big><a class="headerlink" href="#nghttp2_session_del" title="Permalink to this definition"></a></dt>
@ -1569,41 +1639,6 @@ void <tt class="descname">nghttp2_session_del</tt><big>(</big><a class="referenc
<tt class="docutils literal"><span class="pre">NULL</span></tt>, this function does nothing.</p>
</dd></dl>
<dl class="function">
<dt id="nghttp2_session_set_option">
int <tt class="descname">nghttp2_session_set_option</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;*session</em>, int<em>&nbsp;optname</em>, void<em>&nbsp;*optval</em>, size_t<em>&nbsp;optlen</em><big>)</big><a class="headerlink" href="#nghttp2_session_set_option" title="Permalink to this definition"></a></dt>
<dd><p>Sets the configuration option for the <em>session</em>. The <em>optname</em> is
one of <a class="reference internal" href="#nghttp2_opt" title="nghttp2_opt"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_opt</span></tt></a>. The <em>optval</em> is the pointer to the
option value and the <em>optlen</em> is the size of <em>*optval</em>. The
required type of <em>optval</em> varies depending on the <em>optname</em>. See
below.</p>
<p>The following <em>optname</em> are supported:</p>
<dl class="docutils">
<dt><a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE</span></tt></a></dt>
<dd>The <em>optval</em> must be a pointer to <tt class="docutils literal"><span class="pre">int</span></tt>. If the <em>*optval</em> is
nonzero, the library will not send WINDOW_UPDATE for a stream
automatically. Therefore, the application is responsible for
sending WINDOW_UPDATE using
<a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>. This option defaults to 0.</dd>
<dt><a class="reference internal" href="#NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE" title="NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span></tt></a></dt>
<dd>The <em>optval</em> must be a pointer to <tt class="docutils literal"><span class="pre">int</span></tt>. If the <em>*optval</em> is
nonzero, the library will not send WINDOW_UPDATE for connection
automatically. Therefore, the application is responsible for
sending WINDOW_UPDATE using
<a class="reference internal" href="#nghttp2_submit_window_update" title="nghttp2_submit_window_update"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_submit_window_update()</span></tt></a>. This option defaults to 0.</dd>
<dt><a class="reference internal" href="#NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS" title="NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span></tt></a></dt>
<dd>The <em>optval</em> must be a pointer to <tt class="docutils literal"><span class="pre">ssize_t</span></tt>. It is an error
if <em>*optval</em> is 0 or negative.</dd>
</dl>
<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>optname</em> is not supported; or the <em>optval</em> and/or the
<em>optlen</em> are invalid.</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="nghttp2_session_send">
int <tt class="descname">nghttp2_session_send</tt><big>(</big><a class="reference internal" href="#nghttp2_session" title="nghttp2_session">nghttp2_session</a><em>&nbsp;*session</em><big>)</big><a class="headerlink" href="#nghttp2_session_send" title="Permalink to this definition"></a></dt>

View File

@ -512,8 +512,6 @@
<dt><a href="apiref.html#nghttp2_on_data_recv_callback">nghttp2_on_data_recv_callback (C type)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="apiref.html#nghttp2_on_data_send_callback">nghttp2_on_data_send_callback (C type)</a>
</dt>
@ -522,6 +520,8 @@
<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>
@ -567,6 +567,22 @@
</dt>
<dt><a href="apiref.html#nghttp2_opt_set">nghttp2_opt_set (C type)</a>
</dt>
<dt><a href="apiref.html#nghttp2_opt_set.no_auto_connection_window_update">nghttp2_opt_set.no_auto_connection_window_update (C member)</a>
</dt>
<dt><a href="apiref.html#nghttp2_opt_set.no_auto_stream_window_update">nghttp2_opt_set.no_auto_stream_window_update (C member)</a>
</dt>
<dt><a href="apiref.html#nghttp2_opt_set.peer_max_concurrent_streams">nghttp2_opt_set.peer_max_concurrent_streams (C member)</a>
</dt>
<dt><a href="apiref.html#nghttp2_pack_settings_payload">nghttp2_pack_settings_payload (C function)</a>
</dt>
@ -743,6 +759,10 @@
</dt>
<dt><a href="apiref.html#nghttp2_session_client_new2">nghttp2_session_client_new2 (C function)</a>
</dt>
<dt><a href="apiref.html#nghttp2_session_continue">nghttp2_session_continue (C function)</a>
</dt>
@ -799,7 +819,7 @@
</dt>
<dt><a href="apiref.html#nghttp2_session_set_option">nghttp2_session_set_option (C function)</a>
<dt><a href="apiref.html#nghttp2_session_server_new2">nghttp2_session_server_new2 (C function)</a>
</dt>

View File

@ -1292,14 +1292,6 @@
<span class="k">const</span> <span class="n">nghttp2_session_callbacks</span> <span class="o">*</span><span class="n">callbacks</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">user_data</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Frees any resources allocated for |session|. If |session| is</span>
<span class="cm"> * ``NULL``, this function does nothing.</span>
<span class="cm"> */</span>
<span class="kt">void</span> <span class="nf">nghttp2_session_del</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="cm">/**</span>
<span class="cm"> * @enum</span>
<span class="cm"> *</span>
@ -1308,18 +1300,22 @@
<span class="k">typedef</span> <span class="k">enum</span> <span class="p">{</span>
<span class="cm">/**</span>
<span class="cm"> * This option prevents the library from sending WINDOW_UPDATE for a</span>
<span class="cm"> * stream automatically. If this option is set, the application is</span>
<span class="cm"> * responsible for sending WINDOW_UPDATE using</span>
<span class="cm"> * `nghttp2_submit_window_update`.</span>
<span class="cm"> * stream automatically. If this option is set to nonzero, the</span>
<span class="cm"> * library won&#39;t send WINDOW_UPDATE for a stream and the application</span>
<span class="cm"> * is responsible for sending WINDOW_UPDATE using</span>
<span class="cm"> * `nghttp2_submit_window_update`. By default, this option is set to</span>
<span class="cm"> * zero.</span>
<span class="cm"> */</span>
<span class="n">NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="cm">/**</span>
<span class="cm"> * This option prevents the library from sending WINDOW_UPDATE for a</span>
<span class="cm"> * connection automatically. If this option is set, the application</span>
<span class="cm"> * is responsible for sending WINDOW_UPDATE with stream ID 0 using</span>
<span class="cm"> * `nghttp2_submit_window_update`.</span>
<span class="cm"> * connection automatically. If this option is set to nonzero, the</span>
<span class="cm"> * library won&#39;t send WINDOW_UPDATE for a connection and the</span>
<span class="cm"> * application is responsible for sending WINDOW_UPDATE with stream</span>
<span class="cm"> * ID 0 using `nghttp2_submit_window_update`. By default, this</span>
<span class="cm"> * option is set to zero.</span>
<span class="cm"> */</span>
<span class="n">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
<span class="n">NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="mi">1</span><span class="p">,</span>
<span class="cm">/**</span>
<span class="cm"> * This option sets the SETTINGS_MAX_CONCURRENT_STREAMS value of</span>
<span class="cm"> * remote endpoint as if it is received in SETTINGS frame. Without</span>
@ -1333,47 +1329,90 @@
<span class="cm"> * will be overwritten if the local endpoint receives</span>
<span class="cm"> * SETTINGS_MAX_CONCURRENT_STREAMS from the remote endpoint.</span>
<span class="cm"> */</span>
<span class="n">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span> <span class="o">=</span> <span class="mi">3</span>
<span class="n">NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="mi">2</span>
<span class="p">}</span> <span class="n">nghttp2_opt</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * @struct</span>
<span class="cm"> *</span>
<span class="cm"> * Struct to store option values for nghttp2_session.</span>
<span class="cm"> */</span>
<span class="k">typedef</span> <span class="k">struct</span> <span class="p">{</span>
<span class="cm">/**</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE`</span>
<span class="cm"> */</span>
<span class="kt">uint8_t</span> <span class="n">no_auto_stream_window_update</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE`</span>
<span class="cm"> */</span>
<span class="kt">uint8_t</span> <span class="n">no_auto_connection_window_update</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS`</span>
<span class="cm"> */</span>
<span class="kt">uint32_t</span> <span class="n">peer_max_concurrent_streams</span><span class="p">;</span>
<span class="p">}</span> <span class="n">nghttp2_opt_set</span><span class="p">;</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Sets the configuration option for the |session|. The |optname| is</span>
<span class="cm"> * one of :type:`nghttp2_opt`. The |optval| is the pointer to the</span>
<span class="cm"> * option value and the |optlen| is the size of |*optval|. The</span>
<span class="cm"> * required type of |optval| varies depending on the |optname|. See</span>
<span class="cm"> * below.</span>
<span class="cm"> * Like `nghttp2_session_client_new()`, but with additional options</span>
<span class="cm"> * specified in the |opt_set|. The caller must set bitwise-OR of</span>
<span class="cm"> * :enum:`nghttp2_opt` for given options. For example, if it</span>
<span class="cm"> * specifies :enum:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE` and</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS` in the |opt_set|,</span>
<span class="cm"> * the |opt_set_mask| should be</span>
<span class="cm"> * ``NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE |</span>
<span class="cm"> * NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS``.</span>
<span class="cm"> *</span>
<span class="cm"> * The following |optname| are supported:</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE`</span>
<span class="cm"> * The |optval| must be a pointer to ``int``. If the |*optval| is</span>
<span class="cm"> * nonzero, the library will not send WINDOW_UPDATE for a stream</span>
<span class="cm"> * automatically. Therefore, the application is responsible for</span>
<span class="cm"> * sending WINDOW_UPDATE using</span>
<span class="cm"> * `nghttp2_submit_window_update`. This option defaults to 0.</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE`</span>
<span class="cm"> * The |optval| must be a pointer to ``int``. If the |*optval| is</span>
<span class="cm"> * nonzero, the library will not send WINDOW_UPDATE for connection</span>
<span class="cm"> * automatically. Therefore, the application is responsible for</span>
<span class="cm"> * sending WINDOW_UPDATE using</span>
<span class="cm"> * `nghttp2_submit_window_update`. This option defaults to 0.</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS`</span>
<span class="cm"> * The |optval| must be a pointer to ``ssize_t``. It is an error</span>
<span class="cm"> * if |*optval| is 0 or negative.</span>
<span class="cm"> * If the |opt_set_mask| is 0, the |opt_set| could be ``NULL`` safely</span>
<span class="cm"> * and the call is equivalent to `nghttp2_session_client_new()`.</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 |optname| is not supported; or the |optval| and/or the</span>
<span class="cm"> * |optlen| are invalid.</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_session_set_option</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="n">optname</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">optval</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">optlen</span><span class="p">);</span>
<span class="kt">int</span> <span class="nf">nghttp2_session_client_new2</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">**</span><span class="n">session_ptr</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_session_callbacks</span> <span class="o">*</span><span class="n">callbacks</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">user_data</span><span class="p">,</span>
<span class="kt">uint32_t</span> <span class="n">opt_set_mask</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_opt_set</span> <span class="o">*</span><span class="n">opt_set</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Like `nghttp2_session_server_new()`, but with additional options</span>
<span class="cm"> * specified in the |opt_set|. The caller must set bitwise-OR of</span>
<span class="cm"> * :enum:`nghttp2_opt` for given options. For example, if it</span>
<span class="cm"> * specifies :enum:`NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE` and</span>
<span class="cm"> * :enum:`NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS` in the |opt_set|,</span>
<span class="cm"> * the |opt_set_mask| should be</span>
<span class="cm"> * ``NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE |</span>
<span class="cm"> * NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS``.</span>
<span class="cm"> *</span>
<span class="cm"> * If the |opt_set_mask| is 0, the |opt_set| could be ``NULL`` safely</span>
<span class="cm"> * and the call is equivalent to `nghttp2_session_server_new()`.</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_session_server_new2</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">**</span><span class="n">session_ptr</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_session_callbacks</span> <span class="o">*</span><span class="n">callbacks</span><span class="p">,</span>
<span class="kt">void</span> <span class="o">*</span><span class="n">user_data</span><span class="p">,</span>
<span class="kt">uint32_t</span> <span class="n">opt_set_mask</span><span class="p">,</span>
<span class="k">const</span> <span class="n">nghttp2_opt_set</span> <span class="o">*</span><span class="n">opt_set</span><span class="p">);</span>
<span class="cm">/**</span>
<span class="cm"> * @function</span>
<span class="cm"> *</span>
<span class="cm"> * Frees any resources allocated for |session|. If |session| is</span>
<span class="cm"> * ``NULL``, this function does nothing.</span>
<span class="cm"> */</span>
<span class="kt">void</span> <span class="nf">nghttp2_session_del</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="cm">/**</span>
<span class="cm"> * @function</span>

Binary file not shown.

File diff suppressed because one or more lines are too long