typedef int <ttclass="descname">(*nghttp2_on_frame_recv_parse_error_callback)</tt><big>(</big><aclass="reference internal"href="#nghttp2_session"title="nghttp2_session">nghttp2_session</a><em> *session</em>, <aclass="reference internal"href="#nghttp2_frame_type"title="nghttp2_frame_type">nghttp2_frame_type</a><em> type</em>, const uint8_t<em> *head</em>, size_t<em> headlen</em>, const uint8_t<em> *payload</em>, size_t<em> payloadlen</em>, int<em> lib_error_code</em>, void<em> *user_data</em><big>)</big><aclass="headerlink"href="#nghttp2_on_frame_recv_parse_error_callback"title="Permalink to this definition">¶</a></dt>
<dd><p>Callback function invoked when the received control frame octets
could not be parsed correctly. The <em>type</em> indicates the type of
received non-DATA frame. The <em>head</em> is the pointer to the header of
the received frame. The <em>headlen</em> is the length of the
<em>head</em>. According to the spec, the <em>headlen</em> is always 8. In other
words, the <em>head</em> is the first 8 bytes of the received frame. The
<em>payload</em> is the pointer to the data portion of the received frame.
The <em>payloadlen</em> is the length of the <em>payload</em>. This is the data
after the length field. The <em>lib_error_code</em> is one of the error
code defined in <aclass="reference internal"href="#nghttp2_error"title="nghttp2_error"><ttclass="xref c c-macro docutils literal"><spanclass="pre">nghttp2_error</span></tt></a> and indicates the error. The
<em>user_data</em> pointer is the third argument passed in to the call to
<aclass="reference internal"href="#nghttp2_session_client_new"title="nghttp2_session_client_new"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_client_new()</span></tt></a> or <aclass="reference internal"href="#nghttp2_session_server_new"title="nghttp2_session_server_new"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_server_new()</span></tt></a>.</p>
<p>The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
<aclass="reference internal"href="#nghttp2_session_recv"title="nghttp2_session_recv"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_recv()</span></tt></a> and <aclass="reference internal"href="#nghttp2_session_send"title="nghttp2_session_send"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_send()</span></tt></a> functions
immediately return <aclass="reference internal"href="#NGHTTP2_ERR_CALLBACK_FAILURE"title="NGHTTP2_ERR_CALLBACK_FAILURE"><ttclass="xref c c-macro docutils literal"><spanclass="pre">NGHTTP2_ERR_CALLBACK_FAILURE</span></tt></a>.</p>
</dd></dl>
<dlclass="type">
<dtid="nghttp2_on_unknown_frame_recv_callback">
typedef int <ttclass="descname">(*nghttp2_on_unknown_frame_recv_callback)</tt><big>(</big><aclass="reference internal"href="#nghttp2_session"title="nghttp2_session">nghttp2_session</a><em> *session</em>, const uint8_t<em> *head</em>, size_t<em> headlen</em>, const uint8_t<em> *payload</em>, size_t<em> payloadlen</em>, void<em> *user_data</em><big>)</big><aclass="headerlink"href="#nghttp2_on_unknown_frame_recv_callback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">nghttp2_on_frame_recv_parse_error_callback</tt><aclass="headerlink"href="#nghttp2_session_callbacks.nghttp2_on_frame_recv_parse_error_callback"title="Permalink to this definition">¶</a></dt>
<dd><p>Callback function invoked when the received non-DATA frame octets
<aclass="reference internal"href="#nghttp2_on_unknown_frame_recv_callback"title="nghttp2_on_unknown_frame_recv_callback">nghttp2_on_unknown_frame_recv_callback</a><ttclass="descname">on_unknown_frame_recv_callback</tt><aclass="headerlink"href="#nghttp2_session_callbacks.on_unknown_frame_recv_callback"title="Permalink to this definition">¶</a></dt>
...
...
@@ -1881,9 +1860,6 @@ is invoked.</li>
invalid,
<aclass="reference internal"href="#nghttp2_session_callbacks.on_invalid_frame_recv_callback"title="nghttp2_session_callbacks.on_invalid_frame_recv_callback"><ttclass="xref c c-member docutils literal"><spanclass="pre">nghttp2_session_callbacks.on_invalid_frame_recv_callback</span></tt></a>
is invoked.</li>
<li>If the received frame could not be unpacked correctly,
<ttclass="xref c c-member docutils literal"><spanclass="pre">nghttp2_session_callbacks.on_frame_recv_parse_error_callback</span></tt>
is invoked.</li>
<li>If the received frame type is unknown,
<aclass="reference internal"href="#nghttp2_session_callbacks.on_unknown_frame_recv_callback"title="nghttp2_session_callbacks.on_unknown_frame_recv_callback"><ttclass="xref c c-member docutils literal"><spanclass="pre">nghttp2_session_callbacks.on_unknown_frame_recv_callback</span></tt></a>